Package com.mysql.jdbc

Examples of com.mysql.jdbc.NonRegisteringDriver


   * @throws Exception
   */
  public void testBug23626() throws Exception {
    Class<?> clazz = this.conn.getClass();

    DriverPropertyInfo[] dpi = new NonRegisteringDriver().getPropertyInfo(
        dbUrl, null);
    StringBuffer missingSettersBuf = new StringBuffer();
    StringBuffer missingGettersBuf = new StringBuffer();

    Class<?>[][] argTypes = { new Class[] { String.class },
View Full Code Here


    Connection _conn = null;

    try {
     
      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");
      String db = props.getProperty(NonRegisteringDriver.DBNAME_PROPERTY_KEY,  "test");

      String hostSpec = host;
View Full Code Here

      }
    }
  }

  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

    }
    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.