> From: Edward Song [mailto:[EMAIL PROTECTED]
> Subject: RE: Doubt on lifecycle of a class in "shared" folder
>
> I believe it is because you are sharing the class definition,
> not instances, even if they are static instances.
>
> So webapp1 will create a static instance of Sharer, so will
> webapp2 off of the same class definition, but each will have
> its own instance.

What, pray tell, is a "static instance" in Java terminology?

If the class file of interest is being loaded by separate classloaders, then 
there will be separate java.lang.Class instances for each, despite originating 
from the same .class file.  However, the OP claims that the class is in the 
shared library, and should therefore be loaded by Tomcat's shared class loader 
- once.

Since independent testing verifies the proper operation of a normally 
configured Tomcat, the OP's environment is either non-standard (e.g., someone's 
been mucking around with conf/catalina.properties), or the framework is using 
its own classloader, or the OP doesn't really know where his classes are.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to