Package com.mysql.jdbc

Examples of com.mysql.jdbc.NonRegisteringDriver.connect()


      slaveUrl.append(slaveDb);
    }

    slaveProperties.setProperty("roundRobinLoadBalance", "true");

    this.masterConnection = (LoadBalancedMySQLConnection) driver.connect(masterUrl.toString(), masterProperties);

    if (StringUtils.isBlank(slaveHost) && slaveUrl.toString().contains("///")) {
      info(" ----- the salveUrl contains the '///', that means there is no slaver, make slavesConnection = masterConnection --");
      slavesConnection = masterConnection;
    } else {
View Full Code Here


    if (StringUtils.isBlank(slaveHost) && slaveUrl.toString().contains("///")) {
      info(" ----- the salveUrl contains the '///', that means there is no slaver, make slavesConnection = masterConnection --");
      slavesConnection = masterConnection;
    } else {
      this.slavesConnection = (LoadBalancedMySQLConnection) driver.connect(slaveUrl.toString(), slaveProperties);
      this.slavesConnection.setReadOnly(true);
    }

    this.currentConnection = this.masterConnection;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.