throws IOException {
if( ep.isLogTimeEnabled() )
ep.setLong( MsgContext.TIMER_PRE_REQUEST, System.currentTimeMillis());
Request req=ep.getRequest();
Response res=req.getResponse();
if( log.isDebugEnabled() )
log.debug( "Invoke " + req + " " + res + " " + req.requestURI().toString());
res.setNote( epNote, ep );
ep.setStatus( MsgContext.JK_STATUS_HEAD );
RequestInfo rp = req.getRequestProcessor();
rp.setStage(Constants.STAGE_SERVICE);
try {
adapter.service( req, res );
} catch( Throwable t ) {
ep.setStatus(MsgContext.JK_STATUS_ERROR);
log.info("Error servicing request " + req,t);
}
if(ep.getStatus() != MsgContext.JK_STATUS_CLOSED) {
res.finish();
}
req.updateCounters();
req.recycle();
res.recycle();
ep.recycle();
if( ep.getStatus() == MsgContext.JK_STATUS_ERROR ) {
return ERROR;
}
ep.setStatus( MsgContext.JK_STATUS_NEW );