I am converting from JBoss 5 to AS 7.1 we have multiple datasources that use the same pool but with a different user and JNDI name. I get the duplicate error. Does anyone know how to deploy. I have included a segment of my standalone.xml. If anyone has thoughts it would be very helpful. I have not found anything in my search other than changing the pool-name. Also I will need to have 6 total entries similar to this they may all use the same db instance but will have a different JNDI name and different users and passwords.
<datasource jndi-name="java:/jdbc/xyz-xxx-reports" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:oracle:thin:@server:1526:webuat
</connection-url>
<driver>
oracle
</driver>
<security>
<user-name>report_user</user-name>
<password></password>
</security>
<new-connection-sql>select * from dual</new-connection-sql>
<validation>
<check-valid-connection-sql>select * from dual</check-valid-connection-sql>
<background-validation>true</background-validation>
<background-validation-millis>10000</background-validation-millis>
</validation>
<timeout>
<allocation-retry>1</allocation-retry>
</timeout>
</datasource>
<datasource jndi-name="java:/jdbc/abc-analysis" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:oracle:thin:@server:1526:webdev
</connection-url>
<driver-class>
oracle
</driver-class>
<security>
<user-name>history_user</user-name>
<password></password>
</security>
<new-connection-sql>select * from dual</new-connection-sql>
<validation>
<check-valid-connection-sql>select * from dual</check-valid-connection-sql>
<background-validation>true</background-validation>
<background-validation-millis>10000</background-validation-millis>
</validation>
<timeout>
<allocation-retry>1</allocation-retry>
</timeout>
</datasource>
actual boot log message:
10:05:51,760 ERROR [org.jboss.as.controller.management-operation] Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "OracleDS")
]) - failure description: "JBAS014803: Duplicate resource [
(\"subsystem\" => \"datasources\"),
(\"data-source\" => \"OracleDS\")
]"