You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Karel Zabloudil <ka...@seznam.cz> on 2012/05/30 09:33:15 UTC

Shutdown order of Camel routes and Spring beans

I'm using servicemix 4.4.1 and I need to change the order of shutdown steps.
Right now servicemix destroy Spring beans first (calls destroy-methods) and
then shutdown the Camel routes. I need it in reverse order. First shutdown
the routes and then call the destroy-method of the beans. Is it possible to
change the order ?

thanks,
  Karel

--
View this message in context: http://servicemix.396122.n5.nabble.com/Shutdown-order-of-Camel-routes-and-Spring-beans-tp5713430.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Shutdown order of Camel routes and Spring beans

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, May 30, 2012 at 9:33 AM, Karel Zabloudil
<ka...@seznam.cz> wrote:
> I'm using servicemix 4.4.1 and I need to change the order of shutdown steps.
> Right now servicemix destroy Spring beans first (calls destroy-methods) and
> then shutdown the Camel routes. I need it in reverse order. First shutdown
> the routes and then call the destroy-method of the beans. Is it possible to
> change the order ?
>

In the Spring XML tag you can use the depends-on attribute to tell Spring.
Then you can configure your beans to depend on Camel

eg

<camelContext id="myCamel">
   ...
</camelContext>

<bean id="foo" class="..." depends-on="myCamel"/>


> thanks,
>  Karel
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Shutdown-order-of-Camel-routes-and-Spring-beans-tp5713430.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen