I have a custom RequestHandler
where I do some logic, and then add an attribute to the MessageContext
so that I can retrieve it in all my Resource
s (via the @Context annotation). This works great. On the response, I need to access this same attribute. I am able to retrieve it if my Resource
method returns successfully, but not if an exception is thrown. Is it possible to get this same attributes on the MessageContext
somehow, even when an exception is thrown? I use a custom ExceptionMapper
, so I need to throw an exception if it doesn't complete properly.
问问题
99 次