RE: ClassCastException while sharing objects accross applications

2005-10-04 Thread Seva Popov
that the ObjectOutputStream can be used to create binary representation of Serializable objects. --Seva From: Surya Mishra [mailto:[EMAIL PROTECTED] Sent: Mon 10/3/2005 4:12 PM To: Tomcat Users List Subject: ClassCastException while sharing objects accross applications Hi, I am

Re: ClassCastException while sharing objects accross applications

2005-10-04 Thread Andrés Glez .
while sharing objects accross applications The type in Java is a combination of a fully qualified class name and its defining classloader. So the two objects with the same class name are considered different types in your two web applications because each web application is loaded

RE: ClassCastException while sharing objects accross applications

2005-10-04 Thread Caldarale, Charles R
From: Andrés Glez. [mailto:[EMAIL PROTECTED] Subject: Re: ClassCastException while sharing objects accross applications What about using JNDI to share objects between webapps? Won't change anything, due to the previously noted classloader-specific casting issue. What should work

Re: ClassCastException while sharing objects accross applications

2005-10-04 Thread Jon Wingfield
only the interface (and any referenced types) need go in common. Refactoring here we go :) HTH, Jon Caldarale, Charles R wrote: From: Andrés Glez. [mailto:[EMAIL PROTECTED] Subject: Re: ClassCastException while sharing objects accross applications What about using JNDI to share objects

RE: ClassCastException while sharing objects accross applications

2005-10-04 Thread Seva Popov
possible way is to utilize the system MBeanServer. --Seva -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 04, 2005 9:47 AM To: Tomcat Users List Subject: Re: ClassCastException while sharing objects accross applications What Chuck says is right

ClassCastException while sharing objects accross applications

2005-10-03 Thread Surya Mishra
Hi, I am trying to share an object between 2 applications deployed on the same tomcat server. I have put the object in the ServletContext in my first application. I access the object using ServletContext.getContext(firstApp).getAttribute(object);. The object comes in fine but it won't let me cast