0 Replies Latest reply on Apr 19, 2008 3:16 AM by Stuart Ledwich

    Connecting to MySQL Cluster

    Stuart Ledwich Newbie

      I am about to start some testing with JBOSS 4.0.5 and MySQL Cluster.

      I have a traditional mysql-ds.xml to connect to a single instance :

      <local-tx-datasource>
      <jndi-name>mysql-propcoent-bandr</jndi-name>
      <connection-url>jdbc:mysql://172.16.82.1:3306/mytestdb</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>jboss</user-name>
      *****
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
      <!-- sql to call when connection is created
      <new-connection-sql>some arbitrary sql</new-connection-sql>
      -->
      <!-- sql to call on an existing pooled connection when it is obtained from pool
      <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
      -->
      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --><min-pool-size>10</min-pool-size>
      <max-pool-size>35</max-pool-size><transaction-isolation>TRANSACTION_READ_UNCOMMITTED</transaction-isolation>
      <type-mapping>mySQL</type-mapping>

      </local-tx-datasource>



      Does anybody know or can tell me how to connect it to a mysql cluster?

      Cluster config is as below:

      Cluster Configuration
      ---------------------
      [ndbd(NDB)] 2 node(s)
      id=2 @172.16.82.129 (Version: 5.0.51, Nodegroup: 0)
      id=3 @172.16.82.130 (Version: 5.0.51, Nodegroup: 0, Master)

      [ndb_mgmd(MGM)] 1 node(s)
      id=1 @172.16.82.1 (Version: 5.0.51)

      [mysqld(API)] 2 node(s)
      id=4 @172.16.82.129 (Version: 5.0.51)
      id=5 @172.16.82.131 (Version: 5.0.51)



      Any help appreciated Thanks.