Would it be a solution to change the generator in that sense that the generated proxy classes extends from our own RemoteServiceProxy class?
The extended RemoteServiceProxy class would override the doInvoke method to collect information (payload and so on) until I certain end of the "unit of work" is reached. Then we could use the collected data to perform an RPC to a generic method which can handle the information. How can we achieve this? Is it possible to configure it from which class the generated proxy classes are inherit? What do you think? TIA On 21 Sep., 16:14, Thomas Broyer <[email protected]> wrote: > On 21 sep, 11:14, maku <[email protected]> wrote: > > > > If you use a "command pattern" (i.e. have your RPC have only one > > > method and use different Command/Action classes to determine which > > > action shuld be performed), then batching is just a matter of sending > > > a "super-action" whose "parameters" are a list of commands/actions. > > > From my point of view we could NOT use this approach because we have > > an existing application with hundreds or "classical" RPC methods. > > > So I search a way around where I'm able to collect the needed data and > > call a generic RPC method which can handle it.... > > If you use some kind of dependency injection, it should be quite easy > to inject your own implementations of the serviceAsync that'd call > your generic RPC method. > Otherwise, you'd have to copy and tweak the generator to generate a > serviceAsync implementation (stub) that calls your generic RPC instead > of the "normal" RequestBuilder/serialization behavior; and you'd have > to find a way to call your own generator for all but your generic RPC > service (if you intend to use GWT-RPC for this one as well) (pretty > easy actually: give all RemoteService except MyGenericRemoteService to > your own generator, and give MyGenericRemoteService to the "normal" > generator) > > HTH --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
