HttpSession session = request.getSession(false);
if (session != null) {
session.removeAttribute(cometRequestsAttribute);
}
// Close the comet connection
CometEventImpl cometEvent = request.getEvent();
try {
cometEvent.setEventType(CometEvent.EventType.END);
cometEvent.setEventSubType(
CometEvent.EventSubType.WEBAPP_RELOAD);
getNext().event(request, request.getResponse(), cometEvent);
} catch (Exception e) {
container.getLogger().warn(
sm.getString("cometConnectionManagerValve.event"),
e);
} finally {
try {
cometEvent.close();
} catch (IOException e) {
container.getLogger().warn(sm.getString(
"cometConnectionManagerValve.event"), e);
}
}