我有一个类似于camel-file-consumer-template-threads-remaining-alive 的问题。我有一个在 Tomcat 容器中运行的 webapp。我正在使用骆驼版本 2.10.4。在其中,我将该File
组件用作轮询消费者。它的设置如下:
from("/myDir"+
"?delete=true"+
"&startingDirectoryMustExist=true"+
"&scheduledExecutorService=#mySpringManagedExecutorService")
这运行正常,但当我尝试停止 Tomcat 时,我收到以下消息:
SEVERE: The web application [/myapp] appears to have started a thread
named [MyExecuteService-0] but has failed to stop it. This is very likely to
create a memory leak.
调用 shutdown.sh 脚本后,我调用ps -ef | grep tomcat
并且进程仍在运行。如果我的应用程序未加载,或者我没有在我的应用程序中加载此路由,则 tomcat 将正确停止。