Re: Serializable objects lost during Async call
Yes, it could possibly be some of the fields being transient. I'm using Hibernate with Gilead and all subclasses are working perfectly fine through RPC. Somehow gilead as well as rpc are kinda blackboxes and I can't debug into them and figure out what happened. In the end, I have to use Serialize the parent class into string and pass the string over and deserialize it at the client. It's quite a bit of work. But at least it works. On Jul 23, 12:31 am, cokol wrote: > hi.actually impossible.for me it worked out.could u provide more > information on the subclasses. or the fields are marked transient or > such. > > On Jul 22, 6:00 pm, "Kevin (Yau) Leung" wrote: > > > > > I'm using GWT 2.0.3 and have encountered a problem during async rpc. > > > I have a serializable class containing a number of other serializable > > class. E.g. > > > class Parent implements java.io.Serializable { > > private ChildA childA; > > private ChildB childB; > > private ChildC childC; > > private ChildD childD; > > .. > > > } > > > each of the Child classes are also serializable and can be passed over > > async rpc without any problem. However, when I pass this class over > > async rpc, no matter it's from server to client or vice versa. Some > > of the child instances will get lost and become null. It's very > > annoying as whenever a new variable is added to that Parent class, a > > different combination of child instances will get lost. > > > I'm using that parent class to maintain the state of the application > > when closing and opening the app. Of coz I can pass each child > > instance individually in a single rpc when saving the states to the > > server. But when retrieving the states back from the server, it will > > be extremely messy to call 10 different async rpc and check if all > > child instances are ready on each and every onSuccess method. > > > I didn't receive any warning or exception during compile or run time. > > I'm not sure if it's a bug of GWT or it's simply not supported. Can > > anyone suggest what should I do to fix it or get around with it? > > Thanks. > > > Yau -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Serializable objects lost during Async call
hi.actually impossible.for me it worked out.could u provide more information on the subclasses. or the fields are marked transient or such. On Jul 22, 6:00 pm, "Kevin (Yau) Leung" wrote: > I'm using GWT 2.0.3 and have encountered a problem during async rpc. > > I have a serializable class containing a number of other serializable > class. E.g. > > class Parent implements java.io.Serializable { > private ChildA childA; > private ChildB childB; > private ChildC childC; > private ChildD childD; > .. > > } > > each of the Child classes are also serializable and can be passed over > async rpc without any problem. However, when I pass this class over > async rpc, no matter it's from server to client or vice versa. Some > of the child instances will get lost and become null. It's very > annoying as whenever a new variable is added to that Parent class, a > different combination of child instances will get lost. > > I'm using that parent class to maintain the state of the application > when closing and opening the app. Of coz I can pass each child > instance individually in a single rpc when saving the states to the > server. But when retrieving the states back from the server, it will > be extremely messy to call 10 different async rpc and check if all > child instances are ready on each and every onSuccess method. > > I didn't receive any warning or exception during compile or run time. > I'm not sure if it's a bug of GWT or it's simply not supported. Can > anyone suggest what should I do to fix it or get around with it? > Thanks. > > Yau -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Serializable objects lost during Async call
I'm using GWT 2.0.3 and have encountered a problem during async rpc. I have a serializable class containing a number of other serializable class. E.g. class Parent implements java.io.Serializable { private ChildA childA; private ChildB childB; private ChildC childC; private ChildD childD; .. } each of the Child classes are also serializable and can be passed over async rpc without any problem. However, when I pass this class over async rpc, no matter it's from server to client or vice versa. Some of the child instances will get lost and become null. It's very annoying as whenever a new variable is added to that Parent class, a different combination of child instances will get lost. I'm using that parent class to maintain the state of the application when closing and opening the app. Of coz I can pass each child instance individually in a single rpc when saving the states to the server. But when retrieving the states back from the server, it will be extremely messy to call 10 different async rpc and check if all child instances are ready on each and every onSuccess method. I didn't receive any warning or exception during compile or run time. I'm not sure if it's a bug of GWT or it's simply not supported. Can anyone suggest what should I do to fix it or get around with it? Thanks. Yau -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.