Package com.mysql.jdbc

Examples of com.mysql.jdbc.NonRegisteringDriver


   *
   * @throws SQLException
   *             if parsing fails
   */
  protected Properties getPropertiesFromTestsuiteUrl() throws SQLException {
    Properties props = new NonRegisteringDriver().parseURL(dbUrl, null);

    String hostname = props
        .getProperty(NonRegisteringDriver.HOST_PROPERTY_KEY);

    if (hostname == null) {
View Full Code Here


   *
   * @throws SQLException
   *             if parsing fails
   */
  protected Properties getPropertiesFromTestsuiteUrl() throws SQLException {
    Properties props = new NonRegisteringDriver().parseURL(dbUrl, null);

    String hostname = props
        .getProperty(NonRegisteringDriver.HOST_PROPERTY_KEY);

    if (hostname == null) {
View Full Code Here

    props.remove(NonRegisteringDriver.NUM_HOSTS_PROPERTY_KEY);
  }

  protected Connection getLoadBalancedConnection(int badHostLocation, String badHost,
      Properties props) throws SQLException {
    Properties parsedProps = new NonRegisteringDriver().parseURL(dbUrl, null);
   
    String firstHost = parsedProps.getProperty(NonRegisteringDriver.HOST_PROPERTY_KEY);
   
    if (!NonRegisteringDriver.isHostPropertiesList(firstHost)) {
      String port = parsedProps.getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY, "3306");
View Full Code Here

  protected Connection getUnreliableLoadBalancedConnection(String[] hostNames,
      Properties props, Set<String> downedHosts) throws Exception {
        if(props == null){
          props = new Properties();
        }
        NonRegisteringDriver d = new NonRegisteringDriver();
        this.copyBasePropertiesIntoProps(props, d);
        props.setProperty("socketFactory", "testsuite.UnreliableSocketFactory");
        Properties parsed = d.parseURL(BaseTestCase.dbUrl, props);
        String db = parsed.getProperty(NonRegisteringDriver.DBNAME_PROPERTY_KEY);
        String port = parsed.getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY);
        String host = getPortFreeHostname(props, d);
        UnreliableSocketFactory.flushAllHostLists();
        StringBuffer hostString = new StringBuffer();
View Full Code Here

    }
  }
 
  protected ReplicationConnection getUnreliableReplicationConnection(
      Set<MockConnectionConfiguration> configs, Properties props) throws Exception {
    NonRegisteringDriver d = new NonRegisteringDriver();
    this.copyBasePropertiesIntoProps(props, d);
    props.setProperty("socketFactory", "testsuite.UnreliableSocketFactory");
    Properties parsed = d.parseURL(BaseTestCase.dbUrl, props);
    String db = parsed.getProperty(NonRegisteringDriver.DBNAME_PROPERTY_KEY);
    String port = parsed.getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY);
    String host = getPortFreeHostname(props, d);
    UnreliableSocketFactory.flushAllHostLists();
    StringBuffer hostString = new StringBuffer();
View Full Code Here

  protected ReplicationConnection getUnreliableReplicationConnection(String[] hostNames,
      Properties props, Set<String> downedHosts) throws Exception {
        if(props == null){
          props = new Properties();
        }
        NonRegisteringDriver d = new NonRegisteringDriver();
        this.copyBasePropertiesIntoProps(props, d);
        props.setProperty("socketFactory", "testsuite.UnreliableSocketFactory");
        Properties parsed = d.parseURL(BaseTestCase.dbUrl, props);
        String db = parsed.getProperty(NonRegisteringDriver.DBNAME_PROPERTY_KEY);
        String port = parsed.getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY);
        String host = getPortFreeHostname(props, d);
        UnreliableSocketFactory.flushAllHostLists();
        StringBuffer hostString = new StringBuffer();
View Full Code Here

   *
   * @throws Exception
   *             if the test fails.
   */
  public void testBug22628() throws Exception {
    DriverPropertyInfo[] dpi = new NonRegisteringDriver().getPropertyInfo(
        "jdbc:mysql://bogus:9999", new Properties());

    boolean foundHost = false;
    boolean foundPort = false;

View Full Code Here

   *
   * @throws Exception
   *             if the test fails.
   */
  public void testBug61150() throws Exception {
        NonRegisteringDriver driver = new NonRegisteringDriver();
    Properties oldProps = driver.parseURL(BaseTestCase.dbUrl, null);

    String host = driver.host(oldProps);
    int port = driver.port(oldProps);
    String user = oldProps
        .getProperty(NonRegisteringDriver.USER_PROPERTY_KEY);
    String password = oldProps
        .getProperty(NonRegisteringDriver.PASSWORD_PROPERTY_KEY);

View Full Code Here

          && (versionNumObj.toString().indexOf("cluster") != -1)) {
        Connection clusterConn = null;
        Statement clusterStmt = null;

        try {
          clusterConn = new NonRegisteringDriver().connect(url, null);

          clusterStmt = clusterConn.createStatement();
          clusterStmt
              .executeQuery("DROP TABLE IF EXISTS testClusterConn");
          clusterStmt
View Full Code Here

    Properties props = new Properties();

    props.setProperty(NonRegisteringDriver.PROPERTIES_TRANSFORM_KEY,
        transformClassName);

    NonRegisteringDriver driver = new NonRegisteringDriver();

    Properties transformedProps = driver
        .parseURL(BaseTestCase.dbUrl, props);

    assertTrue("albequerque".equals(transformedProps
        .getProperty(NonRegisteringDriver.HOST_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.