try {
// invoke the next filter
chain.doFilter(request, response);
// ensure we close out the request (happy request)
requestService.endRequest(null);
} catch (Exception e) {
// failure occurred in the request so we destroy it
requestService.endRequest(e);
throw new ServletException(e); // rethrow the exception
}