On Wed, Feb 3, 2010 at 10:33 AM, Willem Jiang <[email protected]> wrote:
> I tried to reproduce the error as you said.
> But when I update the bundle, the alive thread number doesn't increase, and
> there is no other thread which name is start with timer://xxx.
>
> I also checked the camel timer component, if the timer component is stopped,
> camel will cancel the timer, and the timer thread will be destroyed.
>
> When you update the bundle, the camel context will be stopped and new camel
> context will be started.
>
Yeah the key is that the camel context is stopped which then stops
all the routes in camel.
It eventually invokes the shutdown on the ScheduledExecutorService
which is the timer.
Anyway as always try upgrading to latest and greatest versions. Camel
2.2 will be shipped in the ESB 4.2 release.
Camel 2.x has been improved tremendously over 1.x and is better at
better startup and shutdown.
> Willem
>
>
> marcin80 wrote:
>>
>> Hi,
>>
>> I'm using Camel 1.6 with ServiceMix4 (FuseESB). I have an OSGi bundle
>> containing camel route whitch starts with:
>>
>> from("timer:foo?period=5000")....
>>
>> I'm using jconsole and I can see there is one thread for this timer. But,
>> when I update a bundle new thread is created for my timer and old thread
>> isn't destroyed.
>>
>> There is any option to destoy old thread when I update bundle?
>>
>> Cheers,
>> Marcin
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus