camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Sushko (JIRA)" <>
Subject [jira] [Created] (CAMEL-5438) Dynamic resolve property for CamelContext
Date Wed, 11 Jul 2012 20:25:34 GMT
Aleksey Sushko created CAMEL-5438:

             Summary: Dynamic resolve property for CamelContext
                 Key: CAMEL-5438
             Project: Camel
          Issue Type: New Feature
          Components: camel-core
    Affects Versions: 2.10.0
            Reporter: Aleksey Sushko

If you read the description of the camel http4 component you can find an example set of parameters
for a consumer.
    <property key="http.proxyHost" value=""/>
    <property key="http.proxyPort" value="8080"/>
In this example, the xml has no universal solution.
I think that the universal solution is to use a property placeholder. In this case, you can
use an external configuration.
    <property key="http.proxyHost" value="{{http.proxyHost}}"/>
    <property key="http.proxyPort" value="{{http.proxyPort}}"/>
One possible solution is to replace the existing structure to access the property
String value = getCamelContext().getProprties().get("my_property");
Replace the call of the new method
String value = getCamelContext().getProprties("my_property");
Inside a method call to use the old design and a response sent to the method of resolvePropertyPlaceholders.

{code:title=An example of implementation}
public String getProperty(String name) { 
   String value = getProperties().get(name); 
      value = resolvePropertyPlaceholders(value); 
   return value; 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message