You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by salemi <sa...@avaya.com> on 2013/08/27 04:55:59 UTC
Is it possible to override a property during runtime after the file
has been load using BridgePropertyPlaceholderConfigurer
Is it possible to override a property on runing time after the file has been
load using BridgePropertyPlaceholderConfigurer
<bean id="bridgePropertyPlaceholder"
class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer" >
<property name="location" value="classpath:settings.properties"/>
</bean>
setting.properties has:
source=activemq
name=master
After camel has been started I like the change values of source and name
based of an algorithm to something else.
This is not unittest code.
-----
Alireza Salemi
--
View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-to-override-a-property-during-runtime-after-the-file-has-been-load-using-BridgeProperr-tp5738008.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Is it possible to override a property during runtime after the
file has been load using BridgePropertyPlaceholderConfigurer
Posted by salemi <sa...@avaya.com>.
Thank for the answer but i am looking for a piece of java code to overwrite a
property value in BridgePropertyPlaceholderConfigurer!
-----
Alireza Salemi
--
View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-to-override-a-property-during-runtime-after-the-file-has-been-load-using-BridgeProperr-tp5738008p5738012.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Is it possible to override a property during runtime after the
file has been load using BridgePropertyPlaceholderConfigurer
Posted by Bharath <bh...@gmail.com>.
Hi Salemi,
There is an option called local-override and set this as true
in context:property-placeholder and check if this helps you
context.xml
<context:property-placeholder location="classpath:sample.properties"
local-override="true" properties-ref="myProperties"/>
<util:properties id="myProperties">
</util:properties>
and import the above spring file in another spring file as below
<import resource="classpath:/META-INF/spring/context.xml">
<util:properties id="myProperties">
<prop key="input.uri">seda.in</prop>
</util:properties>
--
View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-to-override-a-property-during-runtime-after-the-file-has-been-load-using-BridgeProperr-tp5738008p5738009.html
Sent from the Camel - Users mailing list archive at Nabble.com.