1 Reply Latest reply on Jun 17, 2004 9:15 AM by Darran Lofthouse

    problem with mysql-ds.xml in deply directory

    swamy.kuchi Newbie

      hello friends,
      can we configure 2 mysql-ds.xml files in deploy directory with 2 JNDI Names,can u give me the answer quickly.

        • 1. Re: problem with mysql-ds.xml in deply directory
          Darran Lofthouse Master

          Yes you can although the two files will need different names e.g. mysql1-ds.xml and mysql2-ds.xml

          Alternatively just duplicate the definition of the data source within the 'datasources' element in your mysql-ds.xml

          <datasources>
           <local-tx-datasource>
           <jndi-name>MySqlDS1</jndi-name>
           <connection-url>jdbc:mysql://127.0.0.1:3306/darranl</connection-url>
           <driver-class>org.gjt.mm.mysql.Driver</driver-class>
           <user-name>darranl</user-name>
           <password>password</password>
           <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
           </local-tx-datasource>
          
           <local-tx-datasource>
           <jndi-name>MySqlDS2</jndi-name>
           <connection-url>jdbc:mysql://127.0.0.1:3306/darranl</connection-url>
           <driver-class>org.gjt.mm.mysql.Driver</driver-class>
           <user-name>darranl</user-name>
           <password>password</password>
           <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
           </local-tx-datasource>
          </datasources>