You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "asaf.lahav" <as...@gmail.com> on 2007/02/14 13:55:13 UTC

Embedded tomcat

Hi all,

 

I need your suggestion about working with embedded tomcat.

On a test I'm performing, I am running the embedded tomcat and installed one
webapp on it.

 

I need to share objects between the webapp running on the embedded tomcat
and the host VM via a set of classes which are defined both in the webapp
and the host class loaders.

 

The problem is that since the webapp and the host VM hold the same jars BUT
in different locations, a class cast exception occurs every time I try to
cast.

What would be the best way to share objects/information between the webapp
and its host VM?

 

Thanks in advance,

Asaf


RE: Embedded tomcat

Posted by "asaf.lahav" <as...@gmail.com>.
The problem is that I cannot guarantee that web applications running under
the embedded tomcat won't hold any duplicate jars.




-----Original Message-----
From: DJohnson@desknetinc.com [mailto:DJohnson@desknetinc.com] 
Sent: Wednesday, February 14, 2007 3:58 PM
To: Tomcat Users List
Subject: Re: Embedded tomcat

If you remove the duplicate jars from the webapp, it will still find the 
classes via the same classloader used in the host application, and the 
single definition of each class will allow the casts to work.



Please respond to "Tomcat Users List" <us...@tomcat.apache.org>

To:     "'Tomcat Users List'" <us...@tomcat.apache.org>
cc:      
Subject:        Embedded tomcat


Hi all,



I need your suggestion about working with embedded tomcat.

On a test I'm performing, I am running the embedded tomcat and installed 
one
webapp on it.



I need to share objects between the webapp running on the embedded tomcat
and the host VM via a set of classes which are defined both in the webapp
and the host class loaders.



The problem is that since the webapp and the host VM hold the same jars 
BUT
in different locations, a class cast exception occurs every time I try to
cast.

What would be the best way to share objects/information between the webapp
and its host VM?



Thanks in advance,

Asaf





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


Re: Embedded tomcat

Posted by DJ...@desknetinc.com.
If you remove the duplicate jars from the webapp, it will still find the 
classes via the same classloader used in the host application, and the 
single definition of each class will allow the casts to work.



Please respond to "Tomcat Users List" <us...@tomcat.apache.org>

To:     "'Tomcat Users List'" <us...@tomcat.apache.org>
cc:      
Subject:        Embedded tomcat


Hi all,



I need your suggestion about working with embedded tomcat.

On a test I'm performing, I am running the embedded tomcat and installed 
one
webapp on it.



I need to share objects between the webapp running on the embedded tomcat
and the host VM via a set of classes which are defined both in the webapp
and the host class loaders.



The problem is that since the webapp and the host VM hold the same jars 
BUT
in different locations, a class cast exception occurs every time I try to
cast.

What would be the best way to share objects/information between the webapp
and its host VM?



Thanks in advance,

Asaf