HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
int timeLimit = getTimeLimit(request);
if (timeLimit > 0) {
Guard guard = getGuard(req);
if (guard != null) {
//guard.startTimeout(timeLimit);
guard.startOperationsCount(maxOps);
try {
chain.doFilter(req, res);
return;
} catch (GuardException e) {
LOG.warn("Aborting Request "+dump(request));
response.setStatus(SC_REQUEST_TIMEOUT);
rollback(req);
} finally {
guard.stop();
}
}
}
}
chain.doFilter(req, res);