The old code is coming from a native VM cache. After jumping
through hoops to reproduce the behavior without involing
proxies and the RMI marshalling layer, it comes down to the
fact that

Class.forName(String name, boolean initialize, ClassLoader loader)

caches the class byte code in a native hashtable at the VM level,
while just using the ClassLoader directly does not cache the code.
This is certainly inconsistent behavior, and there is no documentation
of the caching behavior or mechanism to flush the cache that I
can find.

The conflict aries because the VM does not believe that a ClassLoader
can return more than one representation of a class, while our class
loader mechanism can. The main MBeanClassLoader of the JBoss
server will return whatever class x.y.z is currently in the ServiceLibraries
repository. If the deployment unit that class x.y.z has been deployed
more than once, there have been mulitiple versions of the class loaded.
If the VM sees an earlier version of class x.y.z, then problems will
happen if the MBeanClassLoader is used in a context that should return
the latest version of class x.y.z.

----- Original Message -----
From: "David Jencks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 20, 2002 6:11 PM
Subject: Re: [JBoss-dev] A problem with the new class loading model


> On 2002.02.20 20:59:59 -0500 Scott M Stark wrote:
> > Which bug is being referred to here, #516684
> > CCE on redeployment of ear with sar/ejb?
> yes.
>
> I could easily be that I simply don't understand much of the sun
> classloading code, however I have never figured out where the old version
> of the class was coming from.  I can see why the workaround works, but not
> really why the original code failed.
>
> david jencks
>



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to