AMQ-6660 - Use a separate lock for lazy scheduler creation to prevent
deadlocks

Switch to using a dedicated lock to initialize the Scheduler object
inside of ActiveMQConnection to prevent a deadlock scenario that occurs
when using the intrinsic ActiveMQConnection lock. This is using double
checked locking so this lock will only be contended with during lazy
creation and then will rely on the volatile reference for future reads
and when stopping/closing.
1 file changed