Hmm from what I understand you should not block on the EJB for so long. You may ignore the future or check later on these futures, I guess.
http://camel.apache.org/async.html "On the other hand the asynchronous version is where the caller sends a message to an Endpoint and then returns immediately back to the caller. The message however is processed in another thread, the asynchronous thread. Then the caller can continue doing other work and at the same time the asynchronous thread is processing the message" . The client sends an Async Request Reply message over HTTP to Camel. The control is immediately returned to the client application, that can continue and do other work while Camel routes the message. 2. Camel invokes an external TCP service using synchronous Request Reply. The client application can do other work simultaneously. 3. The client wants to get the reply so it uses the Future handle it got as response from step 1. With this handle it retrieves the reply, wait if nessasary if the reply is not ready. -----Original Message----- From: vishal1981 [mailto:vishal.changr...@ericsson.com] Sent: Monday, November 12, 2012 6:01 AM To: users@camel.apache.org Subject: Re: Forcefully shutting down routes... Thanks for all your replies so far. Allow me to explain you my use case a little more in detail... As part of my route I am using the EJB endpoint. All that the EJB does is that it calls a stored procedure. The stored procedure takes a long time to execute (in the order of two to three hours). My routes are created and destroyed via a UI. Most of the time the routes will remain un-change once defined by the user. However there could be cases where the user wants to change the route. In this case I currently stop the route, remove the route and then re-create a route based on his new definition. Now, because of the long stored proc and for the fact that EJB component is not shutdownaware I keep seeing those messages - "Waiting as there are still 1 inflight and pending exchanges to complete, timeout in -49 seconds." till the whole stored proc finishes. In such cases I want to just stop the stored proc and the endpoint. My database transactions will ensure my data integrity is not compromised. Whats more confusing is that the EJB component gets called as pat of a Time thread shared by other routes. I dont want to interrupt the time thread since other routes will stop as well. Sorry for being verbose. But any help would be appreciated. regards, -v- -- View this message in context: http://camel.465427.n5.nabble.com/Forcefully-shutting-down-routes-tp5722447p5722557.html Sent from the Camel - Users mailing list archive at Nabble.com. This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful.