Using properties within switchyard.xml

Solution Verified - Updated -

Issue

  • There is a SwitchYard project in which an URL to a REST service is specified like this (in switchyard.xml):

    <resteasy:address>http://test-server:8080/myRestService</resteasy:address>
    
  • Different environments are used (DEVELOPMENT, TEST, and PRODUCTION), which makes it necessary to specify a different URL in each environment. It is preferred to use properties files in which, for example, the following property could be specified:

    dummy.myRestService.url = http://test-server:8080/myRestService
    
  • Given the property file mentioned above, users would like to be able to specify the REST URL in the following way (in switchyard.xml):

    <resteasy:address>${dummy.myRestService.url}</resteasy:address>
    
  • It appears that the only way of making this happen is to add the property as a system property. Is this correct or is there some other way?

  • In SOA-P 5 and EAP 5 it was possible to use properties-service.xml to specify properties files which should be read as system properties. Is there some similar functionality in FSW 6 or is there some better options without performing a restart of the server?

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.0
  • Red Hat JBoss Fuse (Fuse)
    • 6.2.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In