title: Is it possible to override settings in a jboss-web.xml file?
body: <p>Is it possible to override the settings in war file's WEB-INF/jboss-web.xml?  I have a war file from a vendor, and I'd like to change the datasource which it uses without modifying the war file itself.  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jboss-web&gt;
    ....
    &lt;resource-ref&gt;
      &lt;res-ref-name&gt;jdbc/primaryDatasource&lt;/res-ref-name&gt;
      &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
     &lt;jndi-name&gt;java:/primaryDS&lt;/jndi-name&gt;
   &lt;/resource-ref&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want to have two copies of the same war file running in the same container, but each pointing to a different database.  I could modify the war file itself, but I'd have to remodify it each time the vendor ships an update.  </p>
  
  <p>I'd like the first war file to continue to use primaryDS, but have the second instance use secondaryDS.  The container I'm using is jboss-4.2.3.GA.</p>