Re: GWT1.6 RPC service with List in return: Serialization pb

Wed, 15 Apr 2009 12:41:02 -0700

Thank you for your response.
The Objects contained in the List<Object> are all Serializable. So i
will try to use List<Serializable> ... and the compiler will take time
to find all Serializable objects !!!
This List<Object> can only contain Object defined in an external jar
file (aproximatively 150 differents objects !!!!) but as i explain
later, i can not modify those serializable objects...

I can not mark my Object with a DTO interface because those objects
are part of an external jar file. Perhaps can i try to implement your
solution by generating a proxy on top of my objects... (i will try)..

Regards,

Fred

On 15 avr, 02:32, "Dean S. Jones" <[email protected]> wrote:
> GWT needs to know ALL the types that CAN be serialized to the UI at
> compile time. It looks at the RPC parameters and return types,
> traces their roots and possible sub-classes, and makes sure the proper
> serializers/deserializers are present.
>
> First tho, I ask, what good is a List<Object> ???  Say this worked...
> what would you do with the List in the UI?
>
> Second, ONLY Serializable types can be used with RPC, so the Minimum
> that makes ANY sense is List<Serializable>. This may work, but the
> compiler would then take a large amount of time finding ALL
> Serializable classes... bad.
>
> Still, you can then get almost anything in your List... so what do you
> do in the client??? Iterate and check instanceof on each item???
>
> IF I had to do this, I would create a "marker interface",
>
> public interface DTO extends Serializable
> {
>
> }
>
> and make any class that could be used in the UI implement DTO. the
> make it List<DTO>
>
> the compiler would then only generate serializers for anything marked
> DTO, and be much more efficient.
>
> STILL, On the client you don't know exactly what you have in the List,
> and any solution to that problem will
> be slow and error prone.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to