Database Fail Over in Jboss Data sources

前端 未结 2 1077
忘掉有多难
忘掉有多难 2020-12-16 05:24

In JBoss data source how can I give multiple connection strings for database fail over in which I want .

There will be two Mysql db with same tables say DB1 and DB2.

2条回答
  •  孤街浪徒
    2020-12-16 05:47

    
    
    
     
      
        
    
          MySqlDSTest
          true
          jdbc:mysql:loadbalance://ip1,ip2:3306/dbname?
          ,
          com.mysql.jdbc.Driver
          false
          true
          false
          userName
          password
          selcect count(*) from TEST_TAB
          0
          15
          0
          org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker
          
          5
          
          20
          
    
          
          
             com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter
          
          
             com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker
          
          
          select 1
          
          
            select 1
          
          
          
            mySQL
          
        
      
    

    This will work for jboss mapping

提交回复
热议问题