Re: [Beanshell-users] Re: The Context Classpath: Getting Java to see our added classpath.

Pat <[email protected]>
Newsgroups gmane.comp.java.beanshell.devel,gmane.comp.java.beanshell.user
Message-ID <[email protected]>
On Thu, Feb 12, 2004 at 02:47:46PM -0500, David Ward wrote:
> 
> I've seen the ClassCastException you're talking about.  I don't know *exactly*
> why it happens, but if it provides any insight, two Classes are only equal if
> they have the same name *and* came from the same ClassLoader.

Yes, I've seen this problem when Weblogic is doing (non-standard) 
pass-by-reference between applications in the same container... the problem
is that the data objects are created in one classloader and, as you describe,
are not seen as the same type in the other classloader. 

But I thought that this behavior only applied to components within a single EAR
and that it was turned off by default...  I did my tests with an EJB deployed
directly via a JAR file and a separate bshservlet in its own WAR... I can't
imagine why weblogic would try to do pass by reference between those two
classloaders.  It should serialize-deserialize as it would for any remote
call...  


thanks,
Pat


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.