Re: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
I agree with that, i'm using a generic DTO too with a MapString, Object because i don't want to bother to create an IServiceInterfaceAsync for every RPC method i need. So telling in an annotation to GWT which objects are likely to travel over http would be nice. However if we could provide something more flexible than annotation config, it would be nice. My RPC service is part of my framework, and i don't want to have to modify the API to mark the serializable implemenation DTOs. On 18 avr, 22:35, fvisticot fvisti...@gmail.com wrote: +1, a way to specify Object to serialize would be fine !!! On Apr 17, 10:20 pm, Daniel Kurka kurka.dan...@googlemail.com wrote: this is exactly what i was thinking. we need a way to specify the classes that are okay to serialiaze with the service 2009/4/17 Vitali Lovich vlov...@gmail.com Hasn't been accepted - just opened. Anyone can open issues against GWT. That being said, I think there could be room for improvement. For instance, if you specify a serializable interface or serializable abstract class, you should be allowed to enumerate all the various types that can possibly go across the wire in anannotationso as to provide more contextual information that the compiler simply doesn't otherwise have access to at compile time. @Transfers({A.class, B.class, C.class, D.class}) Serializable foo(Serializable[] x); etc. which limits the compiler to only look at A, B, C, D when it comes across trying to compile this RPC function. This would solve a lot of issues make the expressiveness much more powerful. On Fri, Apr 17, 2009 at 3:18 AM, Salvador Diaz diaz.salva...@gmail.comwrote: Frankly I don't see how that issue could be accepted, the fact that you have to mark all your serializable objects as Serializable or IsSerializable has been there from the beginning. It's related to the way the compiler has to know at compile time what objects are allowed to travel through RPCs and how they should be serialized. You simply cannot expect it to magically detect the types that will be added to your String, Object map. On Apr 16, 10:14 pm, kurka.dan...@googlemail.com wrote: I added my concerns to this issue in the gwt issue tracker: http://code.google.com/p/google-web-toolkit/issues/detail?id=3521 --~--~-~--~~~---~--~~ 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-Toolkit@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: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
+1, a way to specify Object to serialize would be fine !!! On Apr 17, 10:20 pm, Daniel Kurka kurka.dan...@googlemail.com wrote: this is exactly what i was thinking. we need a way to specify the classes that are okay to serialiaze with the service 2009/4/17 Vitali Lovich vlov...@gmail.com Hasn't been accepted - just opened. Anyone can open issues against GWT. That being said, I think there could be room for improvement. For instance, if you specify a serializable interface or serializable abstract class, you should be allowed to enumerate all the various types that can possibly go across the wire in an annotation so as to provide more contextual information that the compiler simply doesn't otherwise have access to at compile time. @Transfers({A.class, B.class, C.class, D.class}) Serializable foo(Serializable[] x); etc. which limits the compiler to only look at A, B, C, D when it comes across trying to compile this RPC function. This would solve a lot of issues make the expressiveness much more powerful. On Fri, Apr 17, 2009 at 3:18 AM, Salvador Diaz diaz.salva...@gmail.comwrote: Frankly I don't see how that issue could be accepted, the fact that you have to mark all your serializable objects as Serializable or IsSerializable has been there from the beginning. It's related to the way the compiler has to know at compile time what objects are allowed to travel through RPCs and how they should be serialized. You simply cannot expect it to magically detect the types that will be added to your String, Object map. On Apr 16, 10:14 pm, kurka.dan...@googlemail.com wrote: I added my concerns to this issue in the gwt issue tracker: http://code.google.com/p/google-web-toolkit/issues/detail?id=3521 --~--~-~--~~~---~--~~ 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-Toolkit@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: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
Hasn't been accepted - just opened. Anyone can open issues against GWT. That being said, I think there could be room for improvement. For instance, if you specify a serializable interface or serializable abstract class, you should be allowed to enumerate all the various types that can possibly go across the wire in an annotation so as to provide more contextual information that the compiler simply doesn't otherwise have access to at compile time. @Transfers({A.class, B.class, C.class, D.class}) Serializable foo(Serializable[] x); etc. which limits the compiler to only look at A, B, C, D when it comes across trying to compile this RPC function. This would solve a lot of issues make the expressiveness much more powerful. On Fri, Apr 17, 2009 at 3:18 AM, Salvador Diaz diaz.salva...@gmail.comwrote: Frankly I don't see how that issue could be accepted, the fact that you have to mark all your serializable objects as Serializable or IsSerializable has been there from the beginning. It's related to the way the compiler has to know at compile time what objects are allowed to travel through RPCs and how they should be serialized. You simply cannot expect it to magically detect the types that will be added to your String, Object map. On Apr 16, 10:14 pm, kurka.dan...@googlemail.com wrote: I added my concerns to this issue in the gwt issue tracker: http://code.google.com/p/google-web-toolkit/issues/detail?id=3521 --~--~-~--~~~---~--~~ 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-Toolkit@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: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
this is exactly what i was thinking. we need a way to specify the classes that are okay to serialiaze with the service 2009/4/17 Vitali Lovich vlov...@gmail.com Hasn't been accepted - just opened. Anyone can open issues against GWT. That being said, I think there could be room for improvement. For instance, if you specify a serializable interface or serializable abstract class, you should be allowed to enumerate all the various types that can possibly go across the wire in an annotation so as to provide more contextual information that the compiler simply doesn't otherwise have access to at compile time. @Transfers({A.class, B.class, C.class, D.class}) Serializable foo(Serializable[] x); etc. which limits the compiler to only look at A, B, C, D when it comes across trying to compile this RPC function. This would solve a lot of issues make the expressiveness much more powerful. On Fri, Apr 17, 2009 at 3:18 AM, Salvador Diaz diaz.salva...@gmail.comwrote: Frankly I don't see how that issue could be accepted, the fact that you have to mark all your serializable objects as Serializable or IsSerializable has been there from the beginning. It's related to the way the compiler has to know at compile time what objects are allowed to travel through RPCs and how they should be serialized. You simply cannot expect it to magically detect the types that will be added to your String, Object map. On Apr 16, 10:14 pm, kurka.dan...@googlemail.com wrote: I added my concerns to this issue in the gwt issue tracker: http://code.google.com/p/google-web-toolkit/issues/detail?id=3521 --~--~-~--~~~---~--~~ 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-Toolkit@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: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
any more suggestions? Create a marker interface for the objects that you want to go through RPCs and type your Map with it: public interface DTO extends Serializable{ } ... The you declare your Map as: MapString, DTO Would that work ? --~--~-~--~~~---~--~~ 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-Toolkit@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: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
Using IsSerializable instead of Serializable should also cut down on the number of objects (although of course you have to modify your classes if you marked them as Serializable only). On Thu, Apr 16, 2009 at 6:10 AM, Salvador Diaz diaz.salva...@gmail.comwrote: any more suggestions? Create a marker interface for the objects that you want to go through RPCs and type your Map with it: public interface DTO extends Serializable{ } ... The you declare your Map as: MapString, DTO Would that work ? --~--~-~--~~~---~--~~ 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-Toolkit@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: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
I added my concerns to this issue in the gwt issue tracker: http://code.google.com/p/google-web-toolkit/issues/detail?id=3521 --~--~-~--~~~---~--~~ 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-Toolkit@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: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
perhaps can we use annotations like @gwt.typeArgs Those are deprecated, you should really avoid using them a simple java class containing a MapString,Object Can't you just use a MapString, Serializable ? If the map is going to be travelling through RPCs you really shouldn't be putting objects that don't implement Serializable into it. Cheers, Salvador For every service gwt has a list of classes which can be Serialized (whitelist). If my understanding is right this list is generated by the compiler at compile time by analizing the members of a class. But we can have classes (which ARE serializable) inside our transient map, but gwt will not serialize this classes because of the SerializationPolicy (these classes could not be found by the compiler at compile time). Is there any way to extend the white list of SerializationPolicy.java ? If I add all classes as private members to my class the members are found and the class can be serialized, but this is anoying and we cant do this for all classes (we dynamically decide which classes we need to transfer) Anyone got any expierence with that? Maybe open an issue about this? --~--~-~--~~~---~--~~ 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-Toolkit@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: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
The problem is that the compiler will create the code for al objects in the classpath that implement serialiazable (which are more ore less 1+). This results in enormous compile time and huge javascript... absolutely not doable any more suggestions? 2009/4/15 Salvador Diaz diaz.salva...@gmail.com perhaps can we use annotations like @gwt.typeArgs Those are deprecated, you should really avoid using them a simple java class containing a MapString,Object Can't you just use a MapString, Serializable ? If the map is going to be travelling through RPCs you really shouldn't be putting objects that don't implement Serializable into it. Cheers, Salvador For every service gwt has a list of classes which can be Serialized (whitelist). If my understanding is right this list is generated by the compiler at compile time by analizing the members of a class. But we can have classes (which ARE serializable) inside our transient map, but gwt will not serialize this classes because of the SerializationPolicy (these classes could not be found by the compiler at compile time). Is there any way to extend the white list of SerializationPolicy.java ? If I add all classes as private members to my class the members are found and the class can be serialized, but this is anoying and we cant do this for all classes (we dynamically decide which classes we need to transfer) Anyone got any expierence with that? Maybe open an issue about this? --~--~-~--~~~---~--~~ 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-Toolkit@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: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
I have exactly the same issue with post: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/1b7e3851b943b130/2aa2077f4e6c90e1#2aa2077f4e6c90e1 I have used the Serializable solution but my code/library contains a lot of Serializable classes as well... I really would like to avoid this solution... Is it not possible: 1. to implement the SerializationPolicy and add the class that are Serializable. 2. define annotations in the RPC service with allowed Serializable objects. Fred On Apr 15, 9:30 pm, Daniel Kurka kurka.dan...@googlemail.com wrote: The problem is that the compiler will create the code for al objects in the classpath that implement serialiazable (which are more ore less 1+). This results in enormous compile time and huge javascript... absolutely not doable any more suggestions? 2009/4/15 Salvador Diaz diaz.salva...@gmail.com perhaps can we use annotations like @gwt.typeArgs Those are deprecated, you should really avoid using them a simple java class containing a MapString,Object Can't you just use a MapString, Serializable ? If the map is going to be travelling through RPCs you really shouldn't be putting objects that don't implement Serializable into it. Cheers, Salvador For every service gwt has a list of classes which can be Serialized (whitelist). If my understanding is right this list is generated by the compiler at compile time by analizing the members of a class. But we can have classes (which ARE serializable) inside our transient map, but gwt will not serialize this classes because of the SerializationPolicy (these classes could not be found by the compiler at compile time). Is there any way to extend the white list of SerializationPolicy.java ? If I add all classes as private members to my class the members are found and the class can be serialized, but this is anoying and we cant do this for all classes (we dynamically decide which classes we need to transfer) Anyone got any expierence with that? Maybe open an issue about this?- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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-Toolkit@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: GWT Serialization with CustomFieldSerializer fails because of SerializationPolicy
I have the same issue with an RPC service witch return a ListObject... The compiler does not find the type of elements that could be included in the list... As a workarround i'm obliged to create dummy methods using the classes that could be included in the list... I would like to know how to extend the SerializationPolicy (whiteList...) ?? perhaps can we use annotations like @gwt.typeArgs On 14 avr, 16:36, Daniel Kurka kurka.dan...@googlemail.com wrote: For data transport we use a simple java class containing a MapString, Object This map is transient and we serialize it with a custom field serializer. This works fine for most situations. For every service gwt has a list of classes which can be Serialized (whitelist). If my understanding is right this list is generated by the compiler at compile time by analizing the members of a class. But we can have classes (which ARE serializable) inside our transient map, but gwt will not serialize this classes because of the SerializationPolicy (these classes could not be found by the compiler at compile time). Is there any way to extend the white list of SerializationPolicy.java ? If I add all classes as private members to my class the members are found and the class can be serialized, but this is anoying and we cant do this for all classes (we dynamically decide which classes we need to transfer) Anyone got any expierence with that? Maybe open an issue about this? --~--~-~--~~~---~--~~ 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-Toolkit@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 -~--~~~~--~~--~--~---