activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1302883 - /activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
Date Tue, 20 Mar 2012 13:36:10 GMT
Author: tabish
Date: Tue Mar 20 13:36:10 2012
New Revision: 1302883

URL: http://svn.apache.org/viewvc?rev=1302883&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQ-3776

Modified:
    activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java

Modified: activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java?rev=1302883&r1=1302882&r2=1302883&view=diff
==============================================================================
--- activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
(original)
+++ activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
Tue Mar 20 13:36:10 2012
@@ -19,7 +19,13 @@ package org.apache.activemq.web;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
 
 import javax.jms.Destination;
 import javax.jms.JMSException;
@@ -34,10 +40,10 @@ import javax.servlet.http.HttpServletRes
 import javax.servlet.http.HttpSession;
 
 import org.apache.activemq.MessageAvailableConsumer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.eclipse.jetty.continuation.Continuation;
 import org.eclipse.jetty.continuation.ContinuationSupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A servlet for sending and receiving messages to/from JMS destinations using
@@ -436,8 +442,9 @@ public class MessageListenerServlet exte
         }
         String sessionKey = session.getId() + '-' + clientId;
 
-        AjaxWebClient client = ajaxWebClients.get( sessionKey );
+        AjaxWebClient client = null;
         synchronized (ajaxWebClients) {
+            client = ajaxWebClients.get( sessionKey );
             // create a new AjaxWebClient if one does not already exist for this sessionKey.
             if( client == null ) {
                 if (LOG.isDebugEnabled()) {



Mime
View raw message