title: Environment variables in JBoss datasource
body: <p>I have a JBoss server running and want to deploy a service.
  The service connects to a database which is configured in the following xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;datasources xmlns="http://www.jboss.org/ironjacamar/schema"&gt;
      &lt;datasource jta="false" jndi-name="java:/PMBootStrapDS"
          pool-name="PMBootStrapDS" enabled="true" use-ccm="false"&gt;
          &lt;connection-url&gt;jdbc:postgresql://localhost:5432/i2b2&lt;/connection-url&gt;
          &lt;driver-class&gt;org.postgresql.Driver&lt;/driver-class&gt;
          &lt;driver&gt;postgresql-9.2-1002.jdbc4.jar&lt;/driver&gt;
          &lt;security&gt;
              &lt;user-name&gt;i2b2pm&lt;/user-name&gt;
              &lt;password&gt;demouser&lt;/password&gt;
          &lt;/security&gt;
          &lt;validation&gt;
              &lt;validate-on-match&gt;false&lt;/validate-on-match&gt;
              &lt;background-validation&gt;false&lt;/background-validation&gt;
          &lt;/validation&gt;
          &lt;statement&gt;
              &lt;share-prepared-statements&gt;false&lt;/share-prepared-statements&gt;
          &lt;/statement&gt;
      &lt;/datasource&gt;
  &lt;/datasources&gt;
  </code></pre>
  
  <p>To deploy it on different systems easily, I want to bind the database location to an environment variable.
  I tried something like this</p>
  
  <pre><code>&lt;connection-url&gt;jdbc:postgresql://${env.MY_DB_LOCATION}/i2b2&lt;/connection-url&gt;
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>Any suggestions on how to solve this issue?</p>