Hi Daniel, I will take care of the patch today.
-- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: willemjiang On Saturday, October 27, 2012 at 7:42 AM, Daniel Gredler wrote: > 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.ib...@gmail.com] > Sent: Friday, October 26, 2012 2:04 AM > To: dev@camel.apache.org (mailto:dev@camel.apache.org) > Subject: Re: Camel cold restart via JMX > > On Thu, Oct 25, 2012 at 11:02 PM, Daniel Gredler > <dgred...@dhlglobalmail.com (mailto:dgred...@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.ib...@gmail.com] > > Sent: Thursday, October 25, 2012 2:52 AM > > To: dev@camel.apache.org (mailto:dev@camel.apache.org) > > Subject: Re: Camel cold restart via JMX > > > > On Wed, Oct 24, 2012 at 7:41 PM, Preben.Asmussen <p...@dr.dk > > (mailto:p...@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 > > > (http://Nabble.com). > > > > > > > > > > > > -- > > Claus Ibsen > > ----------------- > > Red Hat, Inc. > > FuseSource is now part of Red Hat > > Email: cib...@redhat.com (mailto:cib...@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: cib...@redhat.com (mailto:cib...@redhat.com) > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen