Sony, I disagree with taking an event-based approach to RPC, but this isn't really the forum for that discussion
John, My problem is not Class serializability, but rather the fact that the GWT compiler rejects any code path that has "SomeServerProcedure.class", since the compiler thinks it will need to translate that class regardless of whether any class or instance members are referenced. I'm suggesting that the compiler is a little bit too eager. When I use annotations, this isn't a problem, since they are simply dropped by the compiler and kept by the server (where I need them). However, that leads to an unnatural wrapping situation, where I basically have a marker class on the client-side that references a server procedure. Does that make sense? I'm not sure if I'm explaining this well, and I can give an example, but it will take a little more time than I have immediately available. I'll probably write it up tonight. On Jan 26, 8:31 am, Sony <xsonymat...@gmail.com> wrote: > Think about an Event based RPC mechanism as outlined in this > Article..http://sonymathew.blogspot.com/2010/01/gwt-jee-blueprint.html > > Essentially, RPC is then merely firing/listening to events. You > merely extend RemtoteRequestEvent and RemtoteRequestEvent and make > sure any member content you add is serializable. > > Sony > > On Jan 25, 10:33 am, John Tamplin <j...@google.com> wrote: > > > > > On Mon, Jan 25, 2010 at 11:26 AM, Nathan Wells <nwwe...@gmail.com> wrote: > > > So, is it possible to get this sort of functionality? It would enable > > > an RPC mechanism that is a lot easier and more natural. I don't think > > > there would be any performance issues, but that is obviously hard to > > > say for sure at this point. > > > The RPC mechanism has no way to serialize a Java Class instance. > > Conceivably, you could write a CustomerFieldSerializer for Class and send > > the name to the client, and then Class.forName (etc) on the server, though I > > haven't tried it. > > > -- > > John A. Tamplin > > Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors