Package org.hsqldb

Examples of org.hsqldb.jdbcDriver


        }.start();
        while(hsqlServer == null) {
            Thread.sleep(50);
        }

        DriverManager.registerDriver(new jdbcDriver());
        connection = DriverManager.getConnection(url, username, password);
    }
View Full Code Here


*/
public class AlternativeDriverTest extends Assert {

    @Test
    public void testConnect() throws Exception {
        final AlternativeDriver orange = new AlternativeDriver(new jdbcDriver(), "jdbc:hsqldb:mem:orange");

        final Driver general = DriverManager.getDriver(orange.getUrl());

        assertNotSame(general, orange);

        orange.register();

        assertSame(orange, DriverManager.getDriver(orange.getUrl()));
        assertSame(general, DriverManager.getDriver(orange.getUrl() + "foo"));

        final AlternativeDriver green = new AlternativeDriver(new jdbcDriver(), "jdbc:hsqldb:mem:green");
        green.register();

        assertSame(orange, DriverManager.getDriver(orange.getUrl()));
        assertSame(green, DriverManager.getDriver(green.getUrl()));
        assertSame(general, DriverManager.getDriver(orange.getUrl() + "foo"));
        assertSame(general, DriverManager.getDriver(green.getUrl() + "bar"));

        final AlternativeDriver green2 = new AlternativeDriver(new jdbcDriver(), "jdbc:hsqldb:mem:green");
        green2.register();

        assertSame(orange, DriverManager.getDriver(orange.getUrl()));
        assertSame(green2, DriverManager.getDriver(green.getUrl()));
        assertSame(general, DriverManager.getDriver(orange.getUrl() + "foo"));
View Full Code Here

    private static final String PASSWORD = "";

    @Before
    public void setup() throws Exception
    {
        DataSource dataSource = new SimpleDriverDataSource(new jdbcDriver(), URL, USERNAME, PASSWORD);
        migrationManager = new DataSourceMigrationManager(dataSource);
        migrationManager.setMigrationResolver(new ResourceMigrationResolver("classpath:/test_migrations/hsql/"));

        jdbcTemplate = new SimpleJdbcTemplate(dataSource);
    }
View Full Code Here

      server = null;
    }
  }

  Connection newConnection() throws SQLException {
    jdbcDriver driver = new jdbcDriver();
    Properties props = new Properties();
    props.setProperty("user", user);
    props.setProperty("password", password);
    return driver.connect(url, props);

    // return DriverManager.getConnection(url, user, password);
  }
View Full Code Here

            }
        }.start();

        startGate.await();

        DriverManager.registerDriver(new jdbcDriver());
        connection = DriverManager.getConnection(url, username, password);
    }
View Full Code Here

    @Parameterized.Parameters(name = "{index} - {4}")
    public static Collection<Object[]> getData(){
        return Arrays.asList(new Object[][]{
                {null, "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1","sa", "", "H2 test" },
                {new jdbcDriver(), "jdbc:hsqldb:mem:testmemdb", "SA", "", "HyperSQL DB test"}
        });
    }
View Full Code Here

TOP

Related Classes of org.hsqldb.jdbcDriver

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.