If you create your own thread pool, then you need to shutdown that also yourself.
eg you tell Camel to use a custom thread pool with #mySpringManagedExecutorService If you create that thread pool yourself then you need to stop it also. Though you can use Camel to create thread pool also as documented using <threadPool> or <threadPoolProfile> http://camel.apache.org/threading-model.html On Wed, Oct 16, 2013 at 3:03 PM, dancerjohn <[email protected]> wrote: > I have a question similar to > [camel-file-consumer-template-threads-remaining-alive][1]. I have a webapp > running in a Tomcat container with a Spring and Camel context. I am using > Camel version 2.10.4. In it I have I use the `File` component as a polling > consumer. It is set up as follows: > > from("/myDir"+ > "?delete=true"+ > "&startingDirectoryMustExist=true"+ > "&scheduledExecutorService=#mySpringManagedExecutorService") > > This runs fine as expected but when I attempt to stop Tomcat I get the > following message: > > 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. > > After invoking the shutdown.sh script I invoke `ps -ef | grep tomcat` and > the process is still running. If my app is not loaded or if I do not load > this route in my app tomcat stops properly. > > > [1]: > http://stackoverflow.com/questions/11207962/camel-file-consumer-template-threads-remaining-alive > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/File-consumer-thread-not-stopping-when-Tomcat-stopped-tp5741668.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
