I don't know the cause of the behavior you are seeing, but I would not
depend on it.  I would give both .ears loader-repository tags.

david jencks

On 2003.02.14 10:02 Kristian K�hler wrote:
> Hi all
> 
> we've got a question regarding the class-loading behaviour in
> JBoss-3.0.6.
> 
> The following simple scenario demonstrates our problem:
> 
> We've got a util class with a static getInstance method (singleton). We
> are
> using this class in a regular application packaged as a EAR containing
> this
> class in a JAR. So far so good. As soon as we're deploying a second EAR
> containing the same class they start to interfere or more precisely
> calling
> getInstance() returns the same reference in both EARs. This behaviour is
> correct according to the JBoss classloading.pdf as far as we can tell.
> 
> To suppress this behaviour (thereby separating the two EARs) we added a
> loader-repository tag to one of the jboss-app.xml files. Now comes the
> part
> that is puzzling for us, if we do so, the behaviour seems to depend on
> the
> order in which the EARs are deployed. If the EAR with the
> loader-repository
> tag is deployed first, the two references to the singleton object are
> different. If the EAR without the loader-repository tag is deployed
> first,
> the reference of the singleton object seems to be used in each of the two
> EARs.
> 
> Shouldn't it be the case that when a loader-repository tag is supplied
> the
> singleton class of the respective EAR should be used rather then using
> the
> one of an EAR which has been deployed before without such a tag?
> 
> Thanks very much in advance
> 
> Steffen & Kristian
> 
> --
> Orientation in Objects GmbH
> http://www.oio.de
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
> are you planning your Web Server Security? Click here to get a FREE
> Thawte SSL guide and find the answers to all your  SSL security issues.
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to