Author: rgodfrey
Date: Wed Apr 23 07:07:16 2008
New Revision: 650876

URL: http://svn.apache.org/viewvc?rev=650876&view=rev
Log:
QPID-832 : connection should be set to started before sessions are started

Modified:
    
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java

Modified: 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java?rev=650876&r1=650875&r2=650876&view=diff
==============================================================================
--- 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
 (original)
+++ 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
 Wed Apr 23 07:07:16 2008
@@ -227,7 +227,7 @@
      * Whether this connection is started, i.e. whether messages are flowing 
to consumers. It has no meaning for message
      * publication.
      */
-    protected boolean _started;
+    protected volatile boolean _started;
 
     /** Policy dictating how to failover */
     protected FailoverPolicy _failoverPolicy;
@@ -862,6 +862,7 @@
         checkNotClosed();
         if (!_started)
         {
+            _started = true;
             final Iterator it = _sessions.values().iterator();
             while (it.hasNext())
             {
@@ -876,7 +877,7 @@
                 }
             }
 
-            _started = true;
+
         }
     }
 


Reply via email to