gwt rpc - GWT RPC serialization and circular references - chicken and egg problem -
i'm using gwt 2.1.1 , client-server communication using asyncservice (not requestfactory). have object returns "fund" object. fund has reference "distributor" object has collection of "fund" objects.
in 1 scenario, i'm returning server, fund "foo" who's distributor reference has "foo", "bar" , "joe" funds. common business scenario. when deserializing on client side, error because "foo" reference in collection of funds in distributor ends no values populated. in particular, fund-id (string) not populated , used in hashcode implementation. during client-side deserialization, "bar" , "joe" funds deserialized properly, foo fails, i.e., gets deserialized few properties.
what going on here when "foo" getting deserialized, has few properties deserialized , gwt attempts deserialize distributor. foo's fund-id property has not yet been deserialized. when distributor's collection of funds being deserialized, , "foo" in encountered, deserializer gives reference in-deserializing "foo" doesn't have fund-id. when gwt attempts add set (hashset) in distributor, hashcode implementation fails.
so question is, in such cases, there way force gwt serialize properties (in case fund-id hashcode depends on) first?
found known issue. else runs across this, , finds question through search:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3577
i'll post info how implement custom serializer once read on folks have fuller picture. invite others well.
Comments
Post a Comment