You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by marcin80 <mt...@gmail.com> on 2010/02/02 20:05:24 UTC
timer component
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
--
View this message in context: http://old.nabble.com/timer-component-tp27425659p27425659.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: timer component
Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Feb 3, 2010 at 10:33 AM, Willem Jiang <wi...@gmail.com> 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
Re: timer component
Posted by Willem Jiang <wi...@gmail.com>.
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.
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