use of org.openforis.collect.web.session.InvalidSessionException in project collect by openforis.
the class SessionListener method sessionDestroyed.
@Override
public void sessionDestroyed(HttpSessionEvent se) {
SessionManager sessionManager = getSessionManager(se);
try {
SessionState sessionState = sessionManager.getSessionState();
User user = null;
if (sessionState != null) {
user = sessionState.getUser();
if (user != null) {
sessionManager.sessionDestroyed();
}
}
if (LOG.isInfoEnabled()) {
String message = "Session destroyed: " + se.getSession().getId();
if (user != null) {
message += " username: " + user.getUsername();
}
LOG.info(message);
}
} catch (InvalidSessionException e) {
// ignore it, session was anonymous
}
}
Aggregations