Camel, Spring, OSGI: Is there a way to specify the stop method?

前端 未结 2 1840
误落风尘
误落风尘 2020-12-20 03:45

I\'m running a Camel Spring OSGI application. The Camel context is initialized through Spring. When the bundle stops, I need to do some clean-up activities, like de-register

2条回答
  •  清歌不尽
    2020-12-20 03:56

    You can use Camel Route policy and write your code to cleanup resource when the route is about to stop or be removed from the context.

提交回复
热议问题