private void handleRequestWithoutFaultBarrier(HttpServletRequest request,
HttpServletResponse response) throws Throwable {
boolean isReleaseResourcesCalled = false;
try {
ServerMessageContext msgContext = createMessageContext(request, response);
RuntimeContextTLS.setRuntimeContext(msgContext);
logger.trace("Set message context and starting request handlers chain: {}", msgContext); //$NON-NLS-1$
// run the request handler chain
configuration.getRequestHandlersChain().run(msgContext);
logger
.trace("Finished request handlers chain and starting response handlers chain: {}", //$NON-NLS-1$
msgContext);
// run the response handler chain
configuration.getResponseHandlersChain().run(msgContext);
logger.trace("Attempting to release resource instance");
isReleaseResourcesCalled = true;
try {
releaseResources(msgContext);
} catch (Exception e) {
logger.trace("Caught exception when releasing resource object", e);
throw e;
}
} catch (Throwable t) {
RuntimeContext originalContext = RuntimeContextTLS.getRuntimeContext();
ServerMessageContext msgContext = null;
try {
logException(t, request);
msgContext = createMessageContext(request, response);
RuntimeContextTLS.setRuntimeContext(msgContext);
msgContext.setResponseEntity(t);
// run the error handler chain
logger.trace("Exception occured, starting error handlers chain: {}", msgContext); //$NON-NLS-1$
configuration.getErrorHandlersChain().run(msgContext);
RuntimeContextTLS.setRuntimeContext(originalContext);