activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r996910 - /activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java
Date Tue, 14 Sep 2010 14:20:27 GMT
Author: dejanb
Date: Tue Sep 14 14:20:27 2010
New Revision: 996910

URL: http://svn.apache.org/viewvc?rev=996910&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-1933 - unsubscribing REST consumers

Added:
    activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java

Added: activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java?rev=996910&view=auto
==============================================================================
--- activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java
(added)
+++ activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java
Tue Sep 14 14:20:27 2010
@@ -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();
+        }
+    }
+}



Mime
View raw message