O.k. thanks for the hint. Now I try to find a solution with GWT2
I would think it should be possible to collect the RPC data - maybe
with overriding the method doSetRequestData(RequestBuilder rb, String
data) of an own RpcRequestBuilder class.
But I see NO elegant way to stop the sending of the
o.k. the solution to prevent sending is simple: I override doCreate
(String serviceEntryPoint) method of my own RpcRequestBuilder and
override the send method of the RequestBuilder which returns null
--~--~-~--~~~---~--~~
You received this message because you are
MyServiceAsync async = GWT.create(MyService.class);
((ServiceDefTarget)
async).setRpcRequestBuilder(MyCustomRpcRequestBuilder());
I don't see the possibility to set a RequestBuilder to a
com.google.gwt.user.client.rpc.ServiceDefTarget instance (the
interface has not such a method).
It is available on gwt trunk. I am using a version of gwt straight from svn,
and I didn't realize this method was not present in older versions.
The advice still holds good, but you may not be able to use it unless you
compile from trunk.
sorry for the trouble!
--Sri
2009/9/22 maku
On 21 sep, 10:37, maku martin.k...@gmx.at wrote:
Hi,
I would like to bundle different RPC calls into one physical http
call.
The idea is to use GWT serialization mechanism and generic
functionality to handle this. I could imagine a generic RPC method
with has a DTO as paramter and the
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
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
We had a similar problem, but couldn't find an easy way to extend
RemoteServiceProxy. Instead, we created custom a RpcRequestBuilder class and
inserted it using the setRpcRequestBuilder() just after calling GWT.create()
to get the service proxy.
MyServiceAsync async = GWT.create(MyService.class);