CayenneDataObject Serialization

From: Heiko.Erhard..i-de.com
Date: Mon Jan 30 2006 - 07:35:57 EST

  • Next message: Andrus Adamchik: "Re: CayenneDataObject Serialization"

    We use CayenneDataObject as base class for our business objects.
    We are passing these objects in our service implementations via a remoting
    layer (EJB in this case), which will deserialize and reserialize them using
    the default Java serialization.
    I am aware that we ought to use value objects for this, but we don't want
    to write/generate value classes that look about the same as the BO class
    (note that we are interested rather in attributes here, not relations)
    including assignment code between them.

    In the writeObject/readObject implementation, the value cache will not be
    serialized if the object is in 'committed' state.
    This might be fine synchronization between data contexts and such, but it
    doesn't suit our case.
    However, we changed this in our common BO base class that extends from
    CayenneDataObject in order to transfer the value cache in any state except
    'hollow' now.

    The question is what side effects we might be causing with this?!?

    --
    Heiko Erhardt
    



    This archive was generated by hypermail 2.0.0 : Mon Jan 30 2006 - 07:36:16 EST