that is what I was looking for...one last question, where would the
"my.properties" file need to be located...or how would it be added to the
path to be made available exactly...thanks again


Jean-Baptiste Onofré wrote:
> 
> Ah OK Ben,
> 
> using Java, you can construct the URIs by hand and provide in endpoint.
> 
> For example, you can use system wide properties, or load a properties 
> file from the classpath (or using Spring resource):
> 
> Properties properties = new Properties();
> properties.load(this.getClass().getClassLoader().getResourceAsStream("my.properties");
> String route = properties.getProperty("route_endpoint");
> String jbiEndpoint = "jbi:" + route:
> from("timer:mytime").to(jbiEndpoint);
> 
> in your RouteBuilder configure() method.
> 
> I never tried this but it should work.
> 
> Regards
> JB
> 
> boday wrote:
>> thanks.  I saw this article earlier, but I'm using the Java DSL (not XML)
>> to
>> configure my routes.  How do I pass/access these properties from
>> MyRouteBuilder.java file?
>> 
>> Overall, are there other ways to get machine specific properties into SMX
>> builds (System properties, etc) besides the Spring configuration?
>> 
>> 
>> Jean-Baptiste Onofré wrote:
>>> Hi Ben;
>>>
>>> Charles Mouillard from Camel has blog this:
>>> http://cmoulliard.blogspot.com/2009/05/trick-to-pass-uri-declared-in-property.html
>>>
>>>
>> 
>> 
>> -----
>> Ben O'Day
>> Vektrel - Senior Consultant
>> 
> 
> -- 
> Jean-Baptiste Onofré (Nanthrax)
> BuildProcess/AutoDeploy Project Leader
> http://buildprocess.sourceforge.net
> [email protected]
> PGP : 17D4F086
> 
> 


-----
Ben O'Day
Vektrel - Senior Consultant

-- 
View this message in context: 
http://www.nabble.com/pass-properties-into-SMX-Camel-Route-tp24610703p24611927.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to