On Mon, Nov 29, 2010 at 5:28 PM, Rickard Öberg <[email protected]> wrote:
> On 2010-11-29 19.14, Paul Merlin wrote:
>>
>> Given qi4j enabled Objects serialization is working, having concerns on
>> the
>> readObject methods could do it ... despite the fact that the readObject
>> method
>> is private.
>> WDYT?
>
> Serialization is, relatively speaking, easy. It's deserialization that is
> the problem, since it needs access to "the environment", i.e. the Module
> which it should use for deserialization. Only way to get to it is by having
> your own custom ObjectInputStream AFAIK.

We (Edward and I) tried quite a lot to get Wicket's session handling
to work with Qi4j's Objects and Transients and it is pretty nasty to
do in a generic way, as you will not only have to find the module, but
do so for each instance in the serialization stream. And Transients
doesn't have a strongly defined state model, it could hold state in
mixins other than PropertyMixin and not violate any contract (as there
are none), unlike ValueComposite which must keep persisted state in
PropertyMixin.

If you can stick purely to ValueComposites instead and then harness
the toJSON() and fromJSON(), then I think you are in much better
state.


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to