git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@996910 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2010-09-14 14:20:27 +00:00
parent c9460a0231
commit ff3edb4a81
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package org.apache.activemq.web;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
public class SessionListener implements HttpSessionListener {
private static final Log LOG = LogFactory.getLog(SessionListener.class);
public void sessionCreated(HttpSessionEvent se) {
}
public void sessionDestroyed(HttpSessionEvent se) {
WebClient client = WebClient.getWebClient(se.getSession());
if (client != null) {
client.close();
}
}
}