Description
Noticed this in vagrant - scheduler is stuck tearing down, with this thread keeping it alive:
"aurora-cron-1_QuartzSchedulerThread" prio=10 tid=0x00007f215c98b000 nid=0x307a in Object.wait() [0x00007f21179b8000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:253) - locked <0x00000000e131f170> (a java.lang.Object)
It turns out that construction of the Scheduler ends up creating and starting a non-daemon QuartzSchedulerThread within quartz code. We should be able to fix this by registering a shutdown hook upfront rather than doing so when we receive SchedulerActive.