mirror of https://github.com/apache/activemq.git
[AMQ-7401] Make double-checked locking thread-safe by declaring the field volatile.
This commit is contained in:
parent
78826c9c73
commit
dac97e6294
|
@ -199,7 +199,7 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
|
||||||
private boolean useDedicatedTaskRunner;
|
private boolean useDedicatedTaskRunner;
|
||||||
protected AtomicInteger transportInterruptionProcessingComplete = new AtomicInteger(0);
|
protected AtomicInteger transportInterruptionProcessingComplete = new AtomicInteger(0);
|
||||||
private long consumerFailoverRedeliveryWaitPeriod;
|
private long consumerFailoverRedeliveryWaitPeriod;
|
||||||
private Scheduler scheduler;
|
private volatile Scheduler scheduler;
|
||||||
private boolean messagePrioritySupported = false;
|
private boolean messagePrioritySupported = false;
|
||||||
private boolean transactedIndividualAck = false;
|
private boolean transactedIndividualAck = false;
|
||||||
private boolean nonBlockingRedelivery = false;
|
private boolean nonBlockingRedelivery = false;
|
||||||
|
|
|
@ -33,9 +33,9 @@ import javax.jms.TopicSession;
|
||||||
public class SessionHolder {
|
public class SessionHolder {
|
||||||
|
|
||||||
private final Session session;
|
private final Session session;
|
||||||
private MessageProducer producer;
|
private volatile MessageProducer producer;
|
||||||
private TopicPublisher publisher;
|
private volatile TopicPublisher publisher;
|
||||||
private QueueSender sender;
|
private volatile QueueSender sender;
|
||||||
|
|
||||||
public SessionHolder(Session session) {
|
public SessionHolder(Session session) {
|
||||||
this.session = session;
|
this.session = session;
|
||||||
|
|
Loading…
Reference in New Issue