Hi,
JBoss (some versions thereof, or some configurations, at least) use a
Unified Class Loader where the classloader is shared among webapps.
Your understanding that each webapp should have its own classloader (and
does, in tomcat) is correct.  Further, your understanding that the two
singletons would be separate, once per context classloader, is also
true.  Is the base class shared (in common/lib or another shared
location) or duplicated (one copy in each WEB-INF/lib)?

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Magne Skjeret [mailto:[EMAIL PROTECTED]
>Sent: Friday, June 04, 2004 2:28 PM
>To: Tomcat Users List
>Subject: Singleton behaviour
>
>Hi
>
>I had a peculiar experience today, which really conflicts with my
>previous knowledge.
>
>I have 2 applications that use the same base classes (just UI
differences).
>I have duplicated those jar files into each of the contexts
WEB-INF/lib.
>
>I try to start a singleton in each of the contexts: e.g
>WebProperties.getInstance()
>But it only seem to do it once, so the singleton is shared cross
context.
>
>I always thought that a static variable was only visible in its
>classloader and its children.
>Surely each context must have its own classloader??
>
>Is this the expected behaviour?
>
>It is a tomcat that runs inside jboss. tomcat 4.1.29
>
>Could it be a jboss issue? I think I saw something in a config file
>about using a jboss classloader.
>
>Thanks
>Magne
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to