Howdy,
This is a fairly common catch-22 situation.

In order to "share" objects between webapps, you need a common
repository.  This is what shared/classes or shared/lib is for in tomcat,
and that's why there's only one copy there.  This is correct behavior.

If you want separate objects, put the code in WEB-INF/classes.  If you
want common objects, put it in shared/classes.

Personally, I'd suggest you put everything under WEB-INF to keep your
webapp self-contained and portable.  Anything you need to exchange with
outside apps can be done in a variety of other ways, e.g. XML documents,
pinging URLs, JMS messages...

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Carlos Pereira [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, October 14, 2003 1:04 PM
>To: [EMAIL PROTECTED]
>Subject: shared/classes folder
>
> I'm developing a set of applications which need to exchange objects
and
>are to be deployed in different servers. During development, i use just
one
>server, and put all the common packages under the
<tomcat>/shared/classes
>folder.
> All applications have their own memory space, so if i use an object
(like
>a static class) in one application, it is different from the same class
in
>another application. But, for classes under <tomcat>/shared/classes,
the
>objects are the same! That is, classes are loaded into the same memory
>space.
> Is this behavior correct? It doesn't seem logical...
> If so, is there any way i can prevent this?
>
> Best regards,
> Carlos Pereira
>
>---------------------------------------------------------------------
>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