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

Reply via email to