In some serializers I've done I've handled this by truncating the
object graph at lazy associations or proxies, serializing them as
"null". This is kind of the same behavior as you get when using a lazy
graph in the view phase, disconnected from the database -- you know you
shouldn't touch anything that's not loaded, so it might as well be
null.
The worse case is when you have an object model that has NON-lazy
associations that you don't actually want to send over for your
particular use case -- e.g. even the non-lazy portions of your object
graph are overkill for what you actually need to send in an RPC. My
current work project (Hibernate Java to Flex client via Axis and SOAP)
is interposing an "object marshaling" layer to enable selective pruning
of things before sending, and reasonably intelligent server
reassociation and update of partial objects once returned from the
client.
All of this is almost certainly more than GWT would want to bite off
itself, but it might be good to at least have pluggable hooks to modify
the serialization behavior, and at a minimum you'll likely need to
support truncation of lazy references to avoid the "serialize the whole
database" problem.
(But you probably knew all this already ;-)
Cheers!
Rob
I do not know if it matches an RPC framework categorization but easy
use of Spring MVC would increase my productivity.
Bill