You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2006/05/02 14:30:22 UTC

svn commit: r398928 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java

Author: jstrachan
Date: Tue May  2 05:29:28 2006
New Revision: 398928

URL: http://svn.apache.org/viewcvs?rev=398928&view=rev
Log:
ensure that the check of whether or not the ConnectionInfo is sent to the broker - and the clientID created - is thread safe to fix AMQ-696

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?rev=398928&r1=398927&r2=398928&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java Tue May  2 05:29:28 2006
@@ -1207,7 +1207,7 @@
      * 
      * @throws JMSException
      */
-    protected void ensureConnectionInfoSent() throws JMSException {
+    protected synchronized void ensureConnectionInfoSent() throws JMSException {
         // Can we skip sending the ConnectionInfo packet??
         if (isConnectionInfoSentToBroker || closed.get()) {
             return;