activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r698103 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
Date Tue, 23 Sep 2008 06:55:52 GMT
Author: rajdavies
Date: Mon Sep 22 23:55:52 2008
New Revision: 698103

URL: http://svn.apache.org/viewvc?rev=698103&view=rev
Log:
removed mutexes - as they are handled at the transport level -
Fix for https://issues.apache.org/activemq/browse/AMQ-1818

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java?rev=698103&r1=698102&r2=698103&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
Mon Sep 22 23:55:52 2008
@@ -23,6 +23,7 @@
 import org.apache.activemq.command.Command;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportFilter;
+import org.apache.activemq.transport.TransportListener;
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -39,10 +40,6 @@
 public class StompTransportFilter extends TransportFilter {
     private static final Log LOG = LogFactory.getLog(StompTransportFilter.class);
     private final ProtocolConverter protocolConverter;
-
-    private final Object sendToActiveMQMutex = new Object();
-    private final Object sendToStompMutex = new Object();
-
     private final FrameTranslator frameTranslator;
 
     private boolean trace;
@@ -76,8 +73,9 @@
     }
 
     public void sendToActiveMQ(Command command) {
-        synchronized (sendToActiveMQMutex) {
-            transportListener.onCommand(command);
+        TransportListener l = transportListener;
+        if (l!=null) {
+            l.onCommand(command);
         }
     }
 
@@ -85,8 +83,9 @@
         if (trace) {
             LOG.trace("Sending: \n" + command);
         }
-        synchronized (sendToStompMutex) {
-            next.oneway(command);
+        Transport n = next;
+        if (n!=null) {
+            n.oneway(command);
         }
     }
 



Mime
View raw message