I have it "mostly" working, although the inability to replace a class (ala readResolve() or writeReplace()) pretty much means it's impossible for an object roundtrip through the RPC layer to work properly. A quick explanation:
* I have a Ref impl of type LiveRef which holds a reference to the live datastore so it can resolve the entity pointed at.
* With java serialization, a LiveRef writeReplace()s to a DeadRef which holds a reference to the actual entity.
My GWT client-only version of LiveRef is now implemented just like DeadRef, so clients can obtain a Ref from the server and work with it. But passing a LiveRef back to the server reconstitutes a real LiveRef which loses the entity part and "reattaches" to the datastore. So it's impossible to do a real roundtrip.
It sounds like I will have to live with this behavior for now.
One thing I want to say is that GWT custom serialization seems unbearably complicated and poorly documented. Here is why it is confusing:
* what runs on client vs what runs on server
* _CustomFieldSerializer vs _ServerCustomFieldSerializer??
* static methods vs instance methods
* instantiate vs deserialize (what's the difference?)
From the outside, this feels like something in desperate need of refactoring. Never mind backwards compatibility; as documented, this feature is basically unusable by anyone who isn't on the GWT team.
Jeff