Examples of acceptsURL()


Examples of com.alibaba.druid.proxy.DruidDriver.acceptsURL()

        Assert.assertTrue(driverWrapper.getDataSourceUrls().length > 0);

        driverWrapper.getPropertyInfo(url_0, new Properties());

        Assert.assertFalse(driverWrapper.acceptsURL(null));
        Assert.assertFalse(driverWrapper.acceptsURL("xxx"));
        Assert.assertTrue(driverWrapper.acceptsURL(url_1));

        Connection connection_1 = DriverManager.getConnection(url_1);
        ConnectionProxy connection_wrapper_1 = connection_1.unwrap(ConnectionProxy.class);
View Full Code Here

Examples of java.sql.Driver.acceptsURL()

                driver = DriverManager.getDriver(url);
            } else {
                // Usage of DriverManager is not possible, as it does not
                // respect the ContextClassLoader
                driver = (Driver) driverFromCCL.newInstance();
                if (!driver.acceptsURL(url)) {
                    throw new SQLException("No suitable driver", "08001");
                }
            }
        } catch (Throwable t) {
            String message = "Cannot create JDBC driver of class '" +
View Full Code Here

Examples of java.sql.Driver.acceptsURL()

        try {
          Class<?> cl = Class.forName(line, false, loader);

          Driver driver = (Driver) cl.newInstance();

          if (driver.acceptsURL(url))
            return cl.getName();
        } catch (Exception e) {
          log.log(Level.WARNING, e.toString(), e);
        }
      }
View Full Code Here

Examples of java.sql.Driver.acceptsURL()

        for (int u = 0; u < urls.length;u++)
        {
            String url = urls[u];
            boolean expectedAcceptance = acceptsURLTable[u][frameworkOffset];
            boolean actualAcceptance = driver.acceptsURL(url);
            assertEquals(expectedAcceptance, actualAcceptance);
        }
    }
   
    /**
 
View Full Code Here

Examples of java.sql.Driver.acceptsURL()

    }

    private static String attemptConnect(PortletRequest request, PoolData data) throws SQLException, IllegalAccessException, InstantiationException {
        Class driverClass = attemptDriverLoad(request, data);
        Driver driver = (Driver) driverClass.newInstance();
        if (driver.acceptsURL(data.url)) {
            Properties props = new Properties();
            if (data.user != null) {
                props.put("user", data.user);
            }
            if (data.password != null) {
View Full Code Here

Examples of java.sql.Driver.acceptsURL()

        try {
            URLClassLoader classLoader = new URLClassLoader( new URL[]{jarURL} );
            Driver driver = (Driver)classLoader.loadClass(driverName).newInstance();
            System.out.println(driver);
            System.out.println("v"+driver.getMajorVersion()+"."+driver.getMinorVersion());
            System.out.println(driver.acceptsURL("jdbc:hsqldb:http://10.0.0.9/logger"));
           
            driver = new JDBCDriverWrapper(driver);
            DriverManager.registerDriver (driver);
        }
        catch(Exception e)
View Full Code Here

Examples of java.sql.Driver.acceptsURL()

    }

    private static String attemptConnect(PortletRequest request, PoolData data) throws SQLException, IllegalAccessException, InstantiationException {
        Class driverClass = attemptDriverLoad(request, data);
        Driver driver = (Driver) driverClass.newInstance();
        if(driver.acceptsURL(data.url)) {
            Properties props = new Properties();
            if(data.user != null) {
                props.put("user", data.user);
            }
            if(data.password != null) {
View Full Code Here

Examples of java.sql.Driver.acceptsURL()

    }

    private static String attemptConnect(PortletRequest request, PoolData data) throws SQLException, IllegalAccessException, InstantiationException {
        Class driverClass = attemptDriverLoad(request, data);
        Driver driver = (Driver) driverClass.newInstance();
        if (driver.acceptsURL(data.url)) {
            Properties props = new Properties();
            if (data.user != null) {
                props.put("user", data.user);
            }
            if (data.password != null) {
View Full Code Here

Examples of java.sql.Driver.acceptsURL()

    }

    private static String attemptConnect(PortletRequest request, PoolData data) throws SQLException, IllegalAccessException, InstantiationException {
        Class driverClass = attemptDriverLoad(request, data);
        Driver driver = (Driver) driverClass.newInstance();
        if(driver.acceptsURL(data.url)) {
            Properties props = new Properties();
            if(data.user != null) {
                props.put("user", data.user);
            }
            if(data.password != null) {
View Full Code Here

Examples of java.sql.Driver.acceptsURL()

    }

    private static String attemptConnect(PortletRequest request, PoolData data) throws SQLException, IllegalAccessException, InstantiationException {
        Class driverClass = attemptDriverLoad(request, data);
        Driver driver = (Driver) driverClass.newInstance();
        if (driver.acceptsURL(data.url)) {
            Properties props = new Properties();
            if (data.user != null) {
                props.put("user", data.user);
            }
            if (data.password != null) {
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.