1 Reply Latest reply on Jan 21, 2005 10:35 AM by Adrian Brock

    mysql cluster

    karl n Newbie

      Hi - I'd like to use jboss to connect to a mysql cluster and load-balance the transactions. For example, if I have one jboss server and 2 mysql server nodes, one transaction will be sent to mysql server A, the next to mysql server B, etc. I'm not sure if this is even possible with jboss...
      The behavior I currently get is all transactions go to mysql server A. If mysql server A is taken offline, the next transaction will fail. Any subsequent transactions will be routed to mysql server B.
      The mysql-ds.xml file:

      <datasources>
       <local-tx-datasource>
       <jndi-name>MySQLDS</jndi-name>
       <connection-url>jdbc:mysql://192.168.0.7:3306,192.168.0.8:3306/testdb</connection-url>
       <driver-class>com.mysql.jdbc.Driver</driver-class>
       <connection-property name="failOverReadOnly">false</connection-property>
       <connection-property name="autoReconnectForPools">true</connection-property>
       <connection-property name="autoReconnect">true</connection-property>
       <connection-property name="roundRobinLoadBalance">true</connection-property>
       <user-name>user</user-name>
       <password>passwd</password>
      
       <metadata>
       <type-mapping>mySQL</type-mapping>
       </metadata>
       </local-tx-datasource>
      
      </datasources>
      


      Any help is greatly appreciated.