Package com.mysql.jdbc

Examples of com.mysql.jdbc.NonRegisteringDriver


      }
    }
  }

  public void testPropertiesDescriptionsKeys() throws Exception {
    DriverPropertyInfo[] dpi = new NonRegisteringDriver().getPropertyInfo(
        dbUrl, null);

    for (int i = 0; i < dpi.length; i++) {
      String description = dpi[i].description;
      String propertyName = dpi[i].name;
View Full Code Here


    props.setProperty("retriesAllDown", "3");
    ReplicationConnection conn2 = this.getUnreliableReplicationConnection(
        new String[] { "first", "second", "third" }, props);
    assertNotNull("Connection should not be null", conn);
    conn2.setAutoCommit(false);
    String port = getPort(props, new NonRegisteringDriver());
    String firstHost = "first:" + port;
    String secondHost = "second:" + port;
    String thirdHost = "third:" + port;

    // "first" should be master, "second" and "third"
View Full Code Here

    props.setProperty("retriesAllDown", "3");
   
    ReplicationConnection conn2 = this.getUnreliableReplicationConnection(
        new String[] { "first", "second", "third" }, props);
    conn2.setAutoCommit(false);
    String port = getPort(props, new NonRegisteringDriver());
    String firstHost = "first:" + port;
    String secondHost = "second:" + port;
    String thirdHost = "third:" + port;

    // "first" should be master, "second" and "third"
View Full Code Here

    }
    return true;
  }

  public void testBug46637() throws Exception {
    NonRegisteringDriver driver = new NonRegisteringDriver();
    Properties props = new Properties();
    copyBasePropertiesIntoProps(props, driver);
    String hostname = getPortFreeHostname(props, driver);
    UnreliableSocketFactory.flushAllHostLists();
    UnreliableSocketFactory.downHost(hostname);
View Full Code Here

    checkBug32216("www.mysql.com", null, "my_database");
  }

  private void checkBug32216(String host, String port, String dbname)
      throws SQLException {
    NonRegisteringDriver driver = new NonRegisteringDriver();

    StringBuffer url = new StringBuffer("jdbc:mysql://");
    url.append(host);

    if (port != null) {
      url.append(':');
      url.append(port);
    }

    url.append('/');
    url.append(dbname);

    Properties result = driver.parseURL(url.toString(), new Properties());

    assertEquals("hostname not equal", host,
        result.getProperty(Driver.HOST_PROPERTY_KEY));
    if (port != null) {
      assertEquals("port not equal", port,
View Full Code Here

  }

  public void testBug48486() throws Exception {

    Properties props = new NonRegisteringDriver().parseURL(dbUrl, null);
    String host = props.getProperty(NonRegisteringDriver.HOST_PROPERTY_KEY,
        "localhost");
    String port = props.getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY,
        "3306");
View Full Code Here

        ForcedLoadBalanceStrategy.class.getName());
    props.setProperty("loadBalanceBlacklistTimeout", "5000");
    props.setProperty("loadBalancePingTimeout", "100");
    props.setProperty("loadBalanceValidateConnectionOnSwapServer", "true");

    String portNumber = new NonRegisteringDriver().parseURL(dbUrl, null)
        .getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY);

    if (portNumber == null) {
      portNumber = "3306";
    }
View Full Code Here

    Properties props = new Properties();
    props.setProperty("loadBalanceStrategy",
        CountingReBalanceStrategy.class.getName());
    props.setProperty("loadBalanceAutoCommitStatementThreshold", "3");

    String portNumber = new NonRegisteringDriver().parseURL(dbUrl, null)
        .getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY);

    if (portNumber == null) {
      portNumber = "3306";
    }
View Full Code Here

  public void testBug56429() throws Exception {
    Properties props = new Driver().parseURL(BaseTestCase.dbUrl, null);
    props.setProperty("autoReconnect", "true");
    props.setProperty("socketFactory", "testsuite.UnreliableSocketFactory");

    Properties urlProps = new NonRegisteringDriver().parseURL(
        BaseTestCase.dbUrl, null);

    String host = urlProps.getProperty(Driver.HOST_PROPERTY_KEY);
    String port = urlProps.getProperty(Driver.PORT_PROPERTY_KEY);
View Full Code Here

  public void testBug58706() throws Exception {
    Properties props = new Driver().parseURL(BaseTestCase.dbUrl, null);
    props.setProperty("autoReconnect", "true");
    props.setProperty("socketFactory", "testsuite.UnreliableSocketFactory");

    Properties urlProps = new NonRegisteringDriver().parseURL(dbUrl,
        null);

    String host = urlProps.getProperty(Driver.HOST_PROPERTY_KEY);
    String port = urlProps.getProperty(Driver.PORT_PROPERTY_KEY);
View Full Code Here

TOP

Related Classes of com.mysql.jdbc.NonRegisteringDriver

Copyright © 2018 www.massapicom. 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.