felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Compagner <jcompag...@j-com.nl>
Subject Re: [Fwd: Re: Wicket and Oscar]
Date Tue, 16 Aug 2005 10:18:01 GMT
How would you do that exactly?

Lets just make an simple example:

MyObjectFromOscar object = new MyObjectFromOscar();

How does this get property deserialized when the session is read back in 
from disk.

creating a base class, that can be found by the web app classloader, and 
extend that one with
classes that can only be found by the oscar loader will not help i think.
Because i think it first needs to have the real class and then it loads 
the base classes
(because this is specified in the real class)

But i don't know exactly how ObjectInputStream resolves classes, how it 
gets its classloaders.
Does it uses its callers class classloader?


> You need to be able to take control of the deserialization process somehow. 
> Perhaps creating a base class that implements writeReplace() and 
> readResolve() would work. If so, that could be the location where you could 
> implement Richard's idea below:
>>> Is it possible to somehow make serialization/deserialization a process
>>> control through a bundle/service, so that everything occurs inside of
>>> Oscar as opposed to the mix and match approach currently being used?
> The deserialization code could check the framework for a (factory) service 
> that can create the required object.
> Greetings, Marcel

View raw message