> -----Original Message-----
> From: David Jencks [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 13, 2001 4:32 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-dev] CVS update:
> jbosscx/src/resources/jca-sar/META-IN F jboss-service.xml
>
>
> On 2001.09.12 23:22:40 -0400 David Maplesden wrote:
> > 1. doesn't work, I tried it hoping it would. The problem
> is not when the
> > RARDeployer is deployed but when the rar's themselves are
> deployed. It
> > is
> > easy to specify (using a depends tag or the classpath
> element) that the
> > RARDeployer or indeed the entire jbosscx.sar needs to be
> deployed before
> > my
> > mbean, the trouble is this does not neccessarily deploy the rar's.
> >
> > The way you originally had the configuration with two
> AutoDeployers (one
> > in
> > the jbosscx.sar) this would have worked, but when I changed the
> > AutoDeployer
> > so that it could wait for the Deployers it uses to be deployed after
> > itself
> > then I removed the AutoDeployer from the jbosscx.sar
> because it really
> > isn't
> > needed. Of course now one way of fixing the problem would
> be to have
> > this
> > extra AutoDeployer again, but I'm not sure I like having two
> > AutoDeployers
> > just for this reason.
>
> I think until we think of a better solution having 2 autodeployers is
> better than splitting up the jbosscx.sar.
>
I thought the opposite, but whatever, its really a case of six of one, half
a dozen of the other. If you want to change it back then do so.
> After a quick look at the autodeployer, it looks to me as if
> it might help
> to try to deploy all possible files as soon as a deployer is
> registered. It
> looks to me as if currently the autodeployer will wait till
> the next scan
> to use the newly registered deployer.
>
I think this might help but its not guaranteed to fix the problem.
> >
> > 2. Sounds feasible and desirable. I had a similar idea except that
> > instead
> > of having to specify these primary sars in the main
> jboss-service.xml
> > file
> > you could just put them in the deploy lib and everything would work
> > nicely.
> > This means however that we are going to run into problems
> with specifying
> > dependencies between rar's and sar's or between ear's and
> sar's or even
> > between ear's and rar's! Basically there is no mechanism
> at present to
> > specify a dependency between files destined for different deployers,
> > which
> > is the problem I am having. The only way to really do this
> of course
> > would
> > be in the AutoDeployer itself but that would require some
> other mechanism
> > because the AutoDeployer doesn't know anything about the
> content of the
> > files it is deploying, maybe a naming scheme?
> >
>
> I agree there is a big problem with autodeploy order - you
> can specify some
> things with ordering the deployers and the directories, but
> this is shaky
> at best.
>
> How about a more generalized/unified deployment architecture?
> At least ejb
> jars and ear's are allowed to have more configuration files
> in them, why
> not put a jboss-service.xml file in that can refer to the
> application.xml
> and external files (or internal jars for use in mbeans, as I think you
> suggest below.)
>
> so...
>
> Any kind of file goes into the universal deployer.
>
> First we look for a jboss-service.xml which will specify
>
> external sar, jar, rar, ear, war dependencies that should be
> deployed first
> a scope for the classloaders for this stuff (? not sure about this)
> internal jar, rar, (ejb) jar dependencies (as you suggest below)
> may reference application.xml, ejb-jar.xml, ra.xml (although
> I'm not sure
> what info would be conveyed)
> mbean dependencies
> mbean configuration
>
> The deployer will unpack the contained packages and feed the
> internal and
> external dependencies to the appropriate deployers.
>
> Then it would deploy using the application.xml or ejb-jar.xml
> or ra.xml
> or...
>
> If there is no jboss-service.xml, it will skip that step and
> treat it like
> a regular rar, ear, or whatever.
>
> It seems to me that all these deployers have 2 stages,
> -create some classloaders and make the classes available
> -interpret some configuration info.
>
> maybe we can make the first step shared among all the
> deployers, and get
> similar "recycling" classloaders everywhere. Does this make
> sense to you?
>
OK the more I think about it the more I think that only the AutoDeployer
needs to know anything about deployment dependencies. It is the autodeploy
the controls the ordering of the deployment and if people are manually
deploying their apps then I think we just have to rely on them doing it in
the right order.
So perhaps we shouldn't have any deployment dependencies in the
jboss-service.xml file at all but have some way of conveying to the
AutoDeployer what the dependencies are on any type of file. How we do this
I don't know, perhaps have a special xml file type that the AutoDeployer
looks for and reads before it deploys anything else. Then we can specify
the dependencies between the files in that file and as all as that file is
copied to the deployment dir before any other files (or exists there at
start up) everything is ok.
This would I think be simple to do and solve most of our problems.
Actually re-reading what you have above this is more or less what you
suggest, right?
As for seperating out the first deployment stage I think this may be a bit
complicated for generalised deployment, every file is in a different format.
> > I have no objection to you moving the classpath deployment
> ahead of the
> > depends check. The reason I didn't do it is that it looks
> (to me) to be
> > quite tricky to do without breaking anything (e.g. what do
> you do if the
> > sar
> > you are recursively deploying is not deployed because of another
> > dependency,
> > how can you even tell if this has happened) and I felt like
> it probably
> > wasn't needed. People should know what mbeans are in the
> sars they are
> > recursively deploying and not put them in depends tags.
>
> Is there a problem with having all the classes available from
> a sar without
> instantiating any mbeans? I couldn't think of a convincing
> problem, not
> could I think of a problem of setting up some of the classloaders and
> waiting for others.
>
I can't think of any either. I was more worried about the behaviour if
things went wrong.
> >
> > On a related note I think we should seriously look at
> changing the sar
> > format so that it contains jars and a default directory
> structure. We
> > can
> > then expand the directory structure and copy the jars somewhere on
> > deployment and leave the sar in the deploy directory
> without any live
> > reference to it. This will allow people to actually remove
> the sar from
> > the
> > deploy directory, at the moment they can't because once it
> is deployed
> > jboss
> > has it open with a URLClassLoader. This will also allow directory
> > structures to be contained in a sar (useful for hypersonic
> and jbossmq at
> > least). There would then have to be some default way of
> finding the root
> > of
> > the directory structure like
> System.getProperty("jboss.system.deployed")
> > +
> > sarFileName.
>
> I've thought this too, the RarDeployer and I think the J2ee
> deployer do
> this. Would we prohibit anything except jar/rar/?? other
> package formats
> to be in the sar? or allow "loose" files as in a jar.
>
> david jencks
> >
I thought that sars could pretty much contain anything. I don't see why we
need to prohibit anything. IMO they need to have jars containing the mbean
classes and related resources and then an arbitrary file structure for
configuration purposes. Who knows what files an mbean will need for its
configuration.
David
PS: I'm about to leave work so I won't see any reply till tommorrow...
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development