Hello, If you are trying to invoke WSDL web service using Camel then this problem is solved I believe. Kindly search the post titled "Is it Camel Bug?". A JIRA was filled and the bug was removed. If you are doing something else then please print the list of current threads in execution. If one of the threads is started by Camel then that could be another bug in the Camel framework. Syed.
Date: Wed, 18 Sep 2013 23:01:34 -0700 From: ml-node+s465427n5739807...@n5.nabble.com To: syedahmed.c...@hotmail.com Subject: Re: After camelContext shutdown, is any way to exit the Java main() method? Did you try to take a thread dump to see what other threads may be there to hang. Also mind that if you have non-deamon threads then a JVM cannot terminate so easily without these threads being terminated first. On Thu, Sep 19, 2013 at 12:48 AM, Paolo28 <[hidden email]> wrote: > I have the same problem. > > I have not found any solution to this issue. I believe that Camel should be > able to shutdown itself in a graceful manner. My scenario: > > 1. process N messages (I´m able to detect which is the last) > 2. once all messages are processed I want to gracefuly terminate the process > 3. depending on the amount of possible errors I need to return non-zero exit > status code > > What I do: > > - from a newly spawned thread I stop the initial route and then whole > context using camelContext.stop() > - this new thread dies - it is not hanging > - I´m using 2.11 > > Result: > > - all the "graceful shutdown stuff" is done (I see log messages) but the > process is still running > - I was even able to reliably reproduce weird behaviour: when running with > INFO log level the camel java process exits as expected, however in case > DEBUG log level it continues to run forever > - also trying to connect via JVVM made the hanging process to finish with > exit status=0 which is also a bit weird > - except the "stopping thread" I do not create any of my own threads. > > I spent 2 days with various approaches and so far was not able to reliably > stop Camel application. > I would prefer some standard way - for example via control bus I would like > to send command to stop everything (there are no more messages anyway). It > seems like Camel in not really designed with this in mind. > > > > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/After-camelContext-shutdown-is-any-way-to-exit-the-Java-main-method-tp5735993p5739792.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [hidden email] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen If you reply to this email, your message will be added to the discussion below: http://camel.465427.n5.nabble.com/After-camelContext-shutdown-is-any-way-to-exit-the-Java-main-method-tp5735993p5739807.html To unsubscribe from After camelContext shutdown, is any way to exit the Java main() method?, click here. NAML -- View this message in context: http://camel.465427.n5.nabble.com/After-camelContext-shutdown-is-any-way-to-exit-the-Java-main-method-tp5735993p5739836.html Sent from the Camel - Users mailing list archive at Nabble.com.