I'd like to run 2 ejb applications with 2 databases under the same JBoss application server.
<local-tx-datasource>
<jndi-name>MySqlDS1</jndi-name>
<connection-url>jdbc:mysql://rep:3306/DB1</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>uid</user-name>
pwd
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>MySqlDS2</jndi-name>
<connection-url>jdbc:mysql://rep:3306/DB2</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>uid</user-name>
pwd
</local-tx-datasource>
But I don't know how to config standardjbosscmp-jdbc.xml because there is only one datasource like this
<jbosscmp-jdbc>
java:/MySqlDS
<datasource-mapping>MySqlDSMapping</datasource-mapping>
...
Any suggestions are appreciated.
Richard
standardjbosscmp-jdbc.xml is, as the file name says, the standard.
Put a jbosscmp-jdbc.xml with the wanted datasource jndi-name in your ejb.jar.