activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1243334 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
Date Sun, 12 Feb 2012 21:09:12 GMT
Author: gtully
Date: Sun Feb 12 21:09:12 2012
New Revision: 1243334

URL: http://svn.apache.org/viewvc?rev=1243334&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3684 - revert initialisation order, thread can be
eager and needs complete state so it must be inited last

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java?rev=1243334&r1=1243333&r2=1243334&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
Sun Feb 12 21:09:12 2012
@@ -48,16 +48,18 @@ public class VMTransport implements Tran
     protected final URI location;
     protected final long id;
     protected LinkedBlockingQueue<Object> messageQueue = new LinkedBlockingQueue<Object>(this.asyncQueueDepth);
-    private TaskRunner taskRunner = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(this,
"VMTransport: " + toString());
 
-    private volatile int receiveCounter;
-
-    // Managed Sate access protected by locks.
     protected final AtomicBoolean stopping = new AtomicBoolean();
     protected final AtomicBoolean started = new AtomicBoolean();
     protected final AtomicBoolean starting = new AtomicBoolean();
     protected final AtomicBoolean disposed = new AtomicBoolean();
 
+    // thread can be eager, so initialisation needs to be last  so that partial state is
not visible
+    protected TaskRunner taskRunner = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(this,
"VMTransport: " + toString());
+
+    private volatile int receiveCounter;
+
+
     public VMTransport(URI location) {
         this.location = location;
         this.id = NEXT_ID.getAndIncrement();



Mime
View raw message