Hi
No you don't really need to override the first method you've mentioned
below, as just overriding the second one is enough and does the job for you.
See the link to the test I've already provided you in this thread.
That said, in case you want to override the way how the system properties
shoul
Thank you Babak. It had to overwrite the following methods in order for
Spring and Camel to work.
public class MyBridgePropertyPlaceholderConfigurer extends
BridgePropertyPlaceholderConfigurer{
@Override
protected String resolvePlaceholder(String placeholder, Properties
p
Hi,
I just modified the test so that it better fits into your given use-case,
e.g. now also the "from clause" contains a placeholder (as in your case):
Test:
https://github.com/apache/camel/blob/master/components/camel-spring/src/test/java/org/apache/camel/component/properties/CamelSpringProperty
Hi
Sorry for the confusion, given your concrete use-case I just added a test
showing how you can achieve this "dynamic" behaviour:
http://git-wip-us.apache.org/repos/asf/camel/diff/17f9678a
Babak
salemi wrote
> Thanks Babak.
>
> When Spring comes up and it tries to resolve the properties for
Thanks Babak.
When Spring comes up and it tries to resolve the properties for the beans,
it doesn't use the PropertiesResolver and it uses
PropertyPlaceholderConfigurer's method called processProperties which uses a
PlaceholderResolvingStringValueResolver and you can't overwrite it !
-
Ali
You can reach/do the same there as well see the setter method:
BridgePropertyPlaceholderConfigurer#setResolver
Through which you can inject your own PropertiesResolver implementation. So
to recapitulate, just implement you own PropertiesResolver by extending
DefaultPropertiesResolver. Then implem
Thank you Babak. Since we are using Camel 2.10 we are using the
BridgePropertyPlaceholderConfigurer as followed below:
How does BridgePropertyPlaceholderConfigurer with the PropertiesComponent?
Thanks,
Ali
-
Alireza Salemi
--
View this message in context:
http://came
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
element then it become immutable!
In our example we have defined the following elements in the camel context
file
Hi,
During the camel startup, our code will query a database and retrieve the
uri information for all the jms endpoints.
I was wondering how can I overwrite the uri of the elements in
example below?
Ali
-
Alireza Salemi
--
View this message in contex
There's a also the following unit-test which should make the idea below clear
to you (check the custom MyCustomResolver implementation):
https://github.com/apache/camel/blob/master/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesResolverTest.java
Babak
Babak Vahdat wrot
You can make use of the other PropertiesComponent method to pass over an
array of locations upfront:
PropertiesComponent.setLocations(String[] locations)
So given your code example it would become:
PropertiesComponent pc = new PropertiesComponent();
pc.setLocations(new String[] {"classpath
Hi Ali,
you could make use of the PropertiesComponent for this purpose:
http://camel.apache.org/properties.html#Properties-ConfiguringinJavaDSL
You can find lots of tests about using this component inside Spring DSL
here:
https://github.com/apache/camel/tree/master/components/camel-spring/src/t
12 matches
Mail list logo