geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: ObjectInputStream with classloading
Date Thu, 03 Feb 2005 22:37:38 GMT

On Feb 3, 2005, at 1:14 PM, David Blevins wrote:

> On Feb 3, 2005, at 10:02 AM, David Jencks wrote:
>> 2. OpenEjb has a broken implementation, EJBObjectInputStream.  This 
>> one uses either a constructor-supplied cl or if that is null, the 
>> TCCL.  Can the use of TCCL be dropped from this implementation?
> We can't use the approach where we pass the classloader in the 
> constructor as we don't know what classloader to use.  The 
> ObjectInputStream is created, we read off the container id, grab the 
> container's classloader then finish deserializing in that classloader 
> as processing continues.

I thought it might be something like that:-)
> Also, we shouldn't be serializing any proxies, so the implementation 
> isn't necessarily broken.  All EJB related proxies need to be swapped 
> out with the server's implementation and shouldn't hit the wire.

The lack of proxies is not the problem, the problem is not loading 
classes that are arrays of a class in the TCCL.  The current 
implementation delegates loading[]

possibly written as

to the parent classloader.

I'll make a minimal fix that doesn't load proxies, just the arrays.

david jencks

> -David

View raw message