Discussion:
Dynamic Changes to Properties File When Using Bridge Property Placeholder
pberkman
2012-11-07 17:06:41 UTC
Permalink
I am using the
org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer to
parameterize most of the varible-configuration in the Camel Contexts/Routes
as such:

<bean id="bridgePropertyPlaceholder"
class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
<property name="location" value="file:nextgate/ms/ngmsroute.properties"/>
</bean>

Unfortunately, the default is to cache all the property values. So, I have
to reload the app every time I need to change anything like a simple port
number in one of the adapters, etc.

Question: is there a way to configure the Bridge Property Placeholder so
that it will check the modify time of the properties file and reload if
necessary?

thanks!
Christian Müller
2012-11-07 23:11:21 UTC
Permalink
Which runtime do you use?
In Karaf and ServiceMix you use the OSGI ConfigAdmin service which does
this for you. For free... ;-)
And you can configure the properties in a nice console too. The changed
property will be also flushed into the config file.

Best,
Christian
Post by pberkman
I am using the
org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer to
parameterize most of the varible-configuration in the Camel Contexts/Routes
<bean id="bridgePropertyPlaceholder"
class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
<property name="location"
value="file:nextgate/ms/ngmsroute.properties"/>
</bean>
Unfortunately, the default is to cache all the property values. So, I have
to reload the app every time I need to change anything like a simple port
number in one of the adapters, etc.
Question: is there a way to configure the Bridge Property Placeholder so
that it will check the modify time of the properties file and reload if
necessary?
thanks!
--
http://camel.465427.n5.nabble.com/Dynamic-Changes-to-Properties-File-When-Using-Bridge-Property-Placeholder-tp5722310.html
Sent from the Camel - Users mailing list archive at Nabble.com.
pberkman
2012-11-07 23:50:48 UTC
Permalink
using Glassfish 3.1.2, so they have OSGI, but that is not a trivial change -
something I need to do in the future for certain, but not just for this
functionality... any other options?
Claus Ibsen
2012-11-08 06:04:41 UTC
Permalink
Post by pberkman
I am using the
org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer to
parameterize most of the varible-configuration in the Camel Contexts/Routes
<bean id="bridgePropertyPlaceholder"
class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
<property name="location" value="file:nextgate/ms/ngmsroute.properties"/>
</bean>
Unfortunately, the default is to cache all the property values. So, I have
to reload the app every time I need to change anything like a simple port
number in one of the adapters, etc.
Question: is there a way to configure the Bridge Property Placeholder so
that it will check the modify time of the properties file and reload if
necessary?
The bridge is an adapter to the Spring property configurer. So check
the Spring docs what they offer from options. Maybe there is a cache
option you can turn off. etc Or maybe from JMX force a re-load of the
file etc.
Post by pberkman
thanks!
--
View this message in context: http://camel.465427.n5.nabble.com/Dynamic-Changes-to-Properties-File-When-Using-Bridge-Property-Placeholder-tp5722310.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen-H+wXaHxf7aLQT0dZR+***@public.gmane.org
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
sergevil
2013-02-08 12:39:13 UTC
Permalink
Hi Peter,

Did you find the solution? I have the same problem.

Thanks,
Serge

Continue reading on narkive:
Search results for 'Dynamic Changes to Properties File When Using Bridge Property Placeholder' (Questions and Answers)
5
replies
can i get question answer of asp.net ?
started 2006-10-11 00:02:47 UTC
software
Loading...