我正在尝试关闭运行1个@JmsListener的Java应用程序。 我等待多长时间都无所谓,但它永远不会停止。
它永远挂在DefaultMessageListenerContainer的doShutdown上。
Threadump是
"DefaultMessageListenerContainer-1@6759" prio=5 tid=0x51 nid=NA waiting
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Object.java:-1)
at java.lang.Thread.join(Thread.java:1252)
at java.lang.Thread.join(Thread.java:1326)
at java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:107)
at java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:46)
at java.lang.Shutdown.runHooks(Shutdown.java:123)
at java.lang.Shutdown.sequence(Shutdown.java:167)
at java.lang.Shutdown.exit(Shutdown.java:212)
- locked <0x20a> (a java.lang.Class)
at java.lang.Runtime.exit(Runtime.java:109)
at java.lang.System.exit(System.java:971)
at my.package.MainApplication.stop(MainApplication.java:124)
我正在运行Spring 4.3.19和Spring Boot 1.5.16