camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Gredler" <dgred...@dhlglobalmail.com>
Subject RE: Camel cold restart via JMX
Date Fri, 26 Oct 2012 23:42:31 GMT
Hi Claus,

Here it is (with patch):

https://issues.apache.org/jira/browse/CAMEL-5747

Take care,

Daniel



-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Friday, October 26, 2012 2:04 AM
To: dev@camel.apache.org
Subject: Re: Camel cold restart via JMX

On Thu, Oct 25, 2012 at 11:02 PM, Daniel Gredler
<dgredler@dhlglobalmail.com> wrote:
> Hi guys,
>
> I did some testing and it does indeed appear that cold restarts do not
> cause any properties files to be reloaded by the PropertiesComponent.
> However, looking at the code, it seems to me that there is a very good
> chance that this is a bug in Camel, and not by design.
>
> PropertiesComponent caches the properties that have already been
> resolved in the instance variable cacheMap, and PropertiesComponent
> overrides doStart() and doStop() in order to play with this cache, but
> the methods being called expect services to be passed in -- not LRU
> caches. These calls to the ServiceHelper methods don't seem to be
doing
> anything:
>
>     @Override
>     protected void doStart() throws Exception {
>         ServiceHelper.startService(cacheMap);
>         super.doStart();
>     }
>
>     @Override
>     protected void doStop() throws Exception {
>         ServiceHelper.stopService(cacheMap);
>         super.doStop();
>     }
>
> Should doStart() be removed, and doStop() be replaced with something
> like this?
>
>     @Override
>     protected void doStop() throws Exception {
>         cacheMap.clear();
>         super.doStop();
>     }
>
> Let me know what you think...
>

Yeah log a ticket for that.


> Take care,
>
> Daniel
>
>
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Thursday, October 25, 2012 2:52 AM
> To: dev@camel.apache.org
> Subject: Re: Camel cold restart via JMX
>
> On Wed, Oct 24, 2012 at 7:41 PM, Preben.Asmussen <pras@dr.dk> wrote:
>> yeah thats really useful.
>> Question : if the Camel context is Spring based will it reload the
> whole
>> SpringCamelContext including property files loaded from the classpath
> or
>> file ?
>> Then one would be able to change file based property configurations,
> and
>> just hit reload.
>>
>
> No it wont, only the Camel part. IMHO this cold restart is not useable
> in all situations.
> And it may not work as some 3rd party libraries may not support
> restarts.
>
> Often a container such as Karaf / Jetty / Tomcat etc. can restart an
> entire application
> by unloading it, and loading it again. That is often better.
>
>
>> Preben
>>
>>
>>
>> --
>> View this message in context:
>
http://camel.465427.n5.nabble.com/Camel-cold-restart-via-JMX-tp5721314p5
> 721513.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message