advice on implementing retries from exceptions

23 views
Skip to first unread message

pablochacin

unread,
Apr 25, 2012, 6:07:51 AM4/25/12
to GWT Dispatch
Hi

I'm just starting to use gwt-dispatch for a large project. One of the
design requirements I have is that
we want to automatically retry failed communications with the server
for some requests, to handle
temporary communication failures or server unresponsiveness due to
high workload. I don't want to
have this code spread all around the applications, so wanted to have
an standard component to
handle this situations.

I've been looking at how the standard DispatchAsynch implementation
works and can't find how to do this
in the gwt-dispatch framework in a clean way. The default behavior is
just to ignore or communicate the
exception based on what the Exception Handles says.

I'm thinking about creating a generic async callback which will wrap
the response callback, and put there
the logic to either retry the request, communicate to the callback or
simply ignore. From my perspective, this
have the added advantage that I can also include other options like
logging the exception, alerting by
means of a "disconnected" indicator, etc.

Have anyone implemented this before? any advice on how to do so?
Reply all
Reply to author
Forward
0 new messages