Hello everyone,
I have a restlet resource that sometimes produces an exception during
processing. Since the exception is the fault of the server and not the fault
of the client I would like to retry the request. When an exception occurs I
get rolled back all the way to the Finder. In the Finder's
I usually do this sort of thing in the ServerResource itself. Just wrap the
problematic lines in the code you just provided only replace the call to
super.handle with whatever calls throw the exception. Are you doing something
in particular that makes this a bad strategy?
-Matt
On May 5,
I just tested that scenario out and it works. Unfortunately though the way
it's all coded up so far requires a lot more code refactoring to edit each
resource than it would be to handle it in the Finder itself. Albeit it would
probably be more correct. Just trying to save myself some time =)
On
You can probably save yourself a lot of work by inserting an extra level of
inheritance. It is a pain to throw in try-catch blocks all over the place, but
if you think about it you might be able to put your try loop in a new
superclass to your resources and get the same functionality. It is
4 matches
Mail list logo