From 3769284ecd6aec800d0a3750f3721b0d71fcb5b9 Mon Sep 17 00:00:00 2001 From: "Christopher L. Shannon (cshannon)" Date: Wed, 20 May 2015 18:38:59 +0000 Subject: [PATCH] Fixing missing volatile on references in VMTransport to prevent a synchronization bug. This resolves https://issues.apache.org/jira/browse/AMQ-5787 --- .../java/org/apache/activemq/transport/vm/VMTransport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java b/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java index 75bd6feb06..4b82f93508 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java +++ b/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java @@ -56,9 +56,9 @@ public class VMTransport implements Transport, Task { protected final long id; // Implementation - private LinkedBlockingQueue messageQueue; - private TaskRunnerFactory taskRunnerFactory; - private TaskRunner taskRunner; + private volatile LinkedBlockingQueue messageQueue; + private volatile TaskRunnerFactory taskRunnerFactory; + private volatile TaskRunner taskRunner; // Transport State protected final AtomicBoolean started = new AtomicBoolean();