Hi Babak,
Thank you for your quick respond. We tried the approach to override a
property at the run time. It seem like if you set the uri attribute for the
<from> element then it become immutable!
In our example we have defined the following elements in the camel context
file
<bean id="bridgePropertyPlaceholder"
class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer" >
<property name="location" value="classpath:settings.properties"/>
</bean>
<route id="routeTypeName" autoStartup="false" >
<from uri="{{type}}.{{name}}.{{dynamic}}"/>
In the settings.properties we define:
type=type
name=name
When camel comes up we retrieve the value for dynamic from db. Are you
proposing to create a new file on the fly and add the name and value to the
file?
PropertiesComponent pc = new PropertiesComponent();
pc.setLocation("classpath:com/mycompany/dynamic.properties");
context.addComponent("properties", pc);
My developer tried to overwrite the existing values of a property using
using a JVM System Property and he told me he can't get it to work.
-----
Alireza Salemi
--
View this message in context:
http://camel.465427.n5.nabble.com/dynamicly-change-the-url-of-the-from-element-after-the-camelcontext-is-started-tp5740599p5740609.html
Sent from the Camel - Users mailing list archive at Nabble.com.