It's a hard problem because a given batch request may spawn subrequests that
may succeed or fail.
You might consider binding HandlerExecutionListener like this:
bind(HandlerExecutionListener.class).toInstance(new
HandlerExecutionListener() {
public void executing(String service, String operation, RequestItem
request) {
...
}
public void executed(String service, String operation, RequestItem
request) {
...
}
});
On Mon, Mar 14, 2011 at 11:40 AM, Nicole Borrelli <[email protected]
> wrote:
> Hello all,
>
> I apologize if this has been answered, but I wasn't able to find it
> with the search terms I could think of in the ML archive.
>
> I'm writing some analytics for a Shindig based OpenSocial container.
> Logging requests is working perfect and was very easy to do. Thanks!
>
> The challenging part is, I can't seem to figure out, in the logging
> code, if the request generated an exception (meaning the call 'failed'
> in some way... such as, people.get being passed an ID that doesn't
> exist vs a perfectly valid ID)
>
> I've been digging through the call tree with my debugger, and trying
> to look for objects that I could inspect to find these "Future"
> objects that seem as though they might hold any exceptions generated
> during the request, but I can't seem to quite get it.
>
> I also suspect I don't need to write a new DefaultHandlerRegistry just
> to catch the exceptions myself. That seems a bit, uh, extreme?
>
> Does anyone have a suggestion? Is there some object or... something
> to find out, in a "HandlerExecutionListener" that an exception was
> thrown during the method invocation?
>
> Thank you very much for your help!
>
> ~Nicole Borrelli
>
--
Paul Lindner -- [email protected] -- linkedin.com/in/plindner