1 Reply Latest reply on Jan 4, 2005 5:57 PM by Frank Langelage

    How to config 2 databases under an JBoss

    richardzheng Newbie

      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