What you don't understand is the fact RequestLifecycle.end() has not been designed to throw any exception except IllegalStateException if you check the signature of the method but this exception never occurs in practice, if it occurs it means that RequestLifecycle.begin/RequestLifecycle.end were not in a try/finally block which should never be the case.

So knowing that you can either
  1. Throw a RuntimeException but if you do that it would mean that you did not implement properly the method ComponentRequestLifecycle.endRequest as no exception should be thrown from these methods.
  2. You caught the exception inside your method ComponentRequestLifecycle.endRequest, in that case we have no way to know that it failed
The rest component sent a response code 200 because the code of your rest component has been executed successfully which is true since the failure occurred outside. It is your job to manage all the possible failures inside your rest component to return the correct code and error message according to the situation. Here is a good example https://github.com/exodev/jcr/blob/master/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java, this is our Webdav connector based on eXo WS as you can see we manage ourself all the possible failures. It is what you are supposed to do.


On Tue, Sep 10, 2013 at 8:47 PM, Nick Scavelli <nscavell@redhat.com> wrote:
I think you are missing the point. If an exception is thrown from RequestLifecycle.end() for whatever reason, the response is still completed (flushed). The root cause of the exception is another subject matter, which I think was a replication issue in EPP 5.2.

- Nick


On 09/10/2013 10:19 AM, Nicolas Filotto wrote:
What is the code of you Rest component and the stack trace ?