简体   繁体   中英

Remote Service in gwt is executed twice

I'm making a call to a service with GWT.

In the client side I made only one call to the method, but in the server-side, the method in the service is called twice.

I debugged the client side with GWT-Tools in Firefox; and when I call once the method, there are two executions in the server. The same data in the parameters, but in two different threads.

I have more calls in the same applications, but the problem is only with that one.

had the same problem with a lot of parallel calls with lot of parameters and with some sub-calls.

some calls occasionally executed twice. parameters and calls from client side were correct, the problem was server-side. with less subcalls/parameters problem was not appearing.

the problem seems to be disappeared when all calls on client were chained into single sequence with no other changes. ie next call is performed when previous call with all its subcalls is completely done (a lot of nested OnSucess instead of subsequent calls).

I got the same problem, and in my case, I found the component I want to add listener to have been register twice, and these two listeners did the same thing -- to call the same RPC method.

So that's why it calls the RPC method once when I debug the client side code, but twice in server side, cause the other call is from the other listener.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM