configuration - Using environment variables in camel.xml to configure endpoints -
configuration - Using environment variables in camel.xml to configure endpoints -
i have cxf endpoint configuration in camel.xml this:
<cxf:cxfendpoint id="callbackinbound" serviceclass="ch.axpo.emis.v1.timeseriesservice.callback" wsdlurl="wsdl/timeseries.wsdl" endpointname="tss:callbackport" address="http://somehost.com:9090/callbackservice" servicename="tss:callbackservice"/>
in 1 of routes phone call endpoint this:
.to("cxf:bean:callbackinbound?dataformat=payload")
so, instead of having prepare address (http://somehost.com:9090/callbackservice) want able configure address different environments (dev, test, prod, ...) using scheme variables. because utilize jboss 7 runtime environment camel , there quite simple way add together scheme variables jboss. there way that? or there improve way configure cxf endpoints in different environments?
thanks, sven
you can utilize properties components , define cxfendpoint this
system.setproperty("environment", "junit"); <cxf:cxfendpoint id="routerendpoint" address="{{router.address}}" serviceclass="org.apache.camel.component.cxf.helloservice"/>
you can define property file this
router.address={{{{environment}}.router.address}} # local server junit.router.address=junit # local server local.router.address=local # test test.router.address=test # prod prod.router.address=prod
variables configuration apache-camel environment endpoint
Comments
Post a Comment