Thomas Mahler wrote:
I think this problem could be resolved by providing a configuration option that would turn-on proxy materializing triggered by serialization of persistent classes. This would result in fully materialized model transfered to a client, and transparent proxy handling for serialization.

Yes, this could be an elegant solution! AFAIK there are some callbacks in the serialization api that could help to implement this trick.
Only disatvantage I see: persistent classes must be derived from a base class implementing these callbacks?

Any Serializable class can override these two functions for special handling during serialization/deserialization:

private void writeObject(java.io.ObjectOutputStream out)
throws IOException
private void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException;

So the only base assumed is the Serialization interface.
I do this when I want to ensure that certain proxies (or transient objects) are materialized during serialization or deserialization. I too do not use c/s (I do use ejb with jboss) and I want the flexibility to choose how heavy my serialized object is under different conditions.

I'm interested to see where this all leads...

Phil



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to