I use GWT (Java for JavaScript) as a front-end and RPC
mechanism ( AJAX
) to make server requests ( Servlets
are keys).
Now everything will be smooth.
Now a test script has been created, for example
1) Make a request to the server
2) Between disconnecting the Internet client (user).
3) We are handling an InvocationException
showing a few message
.
@Override public void onFailure(Throwable caught) { NTMaskAlert.unMask(); if(caught instanceof InvocationException){ NTFailureMessage.showFailureException(caught,"Network disconnected"); } onNTFailure(caught); }
3) Now the client
reconnected, the user makes a request.
Here is an interesting point.
As soon as the Internet reconnected, the browser began to process previous request
, I noticed this in a fire-bug. If I disconnect twice and reconnect twice, automatically request twice and duplicate data.
source share