0 Replies Latest reply on Apr 9, 2006 7:17 AM by biswajit_java

    mysql-xa-ds.xml is not working...

    biswajit_java Newbie

      hi all,

      i am using MySQL Server 5.0 as the database
      my mysql-ds.xml is working fine when i am working with one database(ie in my machine).

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- $Id: mysql-ds.xml,v 1.3.2.1 2004/12/01 11:46:00 schrouf Exp $ -->
      <!-- Datasource config for MySQL using 3.0.9 available from:
      http://www.mysql.com/downloads/api-jdbc-stable.html
      -->


      <local-tx-datasource>
      <jndi-name>MySqlDS</jndi-name>
      <use-java-context>false</use-java-context>
      <connection-url>jdbc:mysql://localhost:3306/testing</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>root</user-name>
      root123
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

      <type-mapping>mySQL</type-mapping>

      </local-tx-datasource>


      but when i am working with 2 databse server(database are in two different machine),i am getting

      java.net.SocketException: java.net.ConnectException: Connection refused: connect
      my mysql-xa-ds.xml file looks like this,which i have placed along with that mysql-ds.xml in server/default/deploy folder.

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- $Id: mysql-ds.xml,v 1.3.2.1 2004/12/01 11:46:00 schrouf Exp $ -->
      <!-- Datasource config for MySQL using 3.0.9 available from:
      http://www.mysql.com/downloads/api-jdbc-stable.html
      -->




      <ha-xa-datasource>
      <jndi-name>MySqlDS</jndi-name>
      <use-java-context>false</use-java-context>

      <track-connection-by-tx/>
      <isSameRM-override-value>false</isSameRM-override-value>
      <xa-datasource-class>com.mysql.jdbc.Driver</xa-datasource-class>
      <xa-datasource-property name="URL">jdbc:mysql://localhost:3306/testing|jdbc:mysql://192.168.149.49:3306/testing</xa-datasource-property>
      <xa-datasource-property name="User">root</xa-datasource-property>
      <xa-datasource-property name="Password">root123</xa-datasource-property>
      <xa-datasource-property name="CreateDatabase">create</xa-datasource-property>

      <url-delimeter>|</url-delimeter>
      <check-valid-connection-sql>VALUES CURRENT TIMESTAMP</check-valid-connection-sql>

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

      <type-mapping>mySQL</type-mapping>

      </ha-xa-datasource>





      pliz provide me appropriate solution for this.
      thanks in advance.

      Biswajit.