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.
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
....
<resource-ref>
<res-ref-name>jdbc/primaryDatasource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:/primaryDS</jndi-name>
</resource-ref>
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.
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.