Package org.apache.derby.jdbc

Examples of org.apache.derby.jdbc.EmbeddedDriver


                _connectionManager = null;
            }

        if (_needDerbyShutdown) {
            __log.debug("shutting down derby.");
            EmbeddedDriver driver = new EmbeddedDriver();
            try {
                driver.connect(_derbyUrl + ";shutdown=true", new Properties());
            } catch (SQLException ex) {
                // Shutdown will always return an exeption!
                if (ex.getErrorCode() != 45000)
                    __log.error("Error shutting down Derby: " + ex.getErrorCode(), ex);
View Full Code Here


                _connectionManager = null;
            }

        if (_needDerbyShutdown) {
            __log.debug("shutting down derby.");
            EmbeddedDriver driver = new EmbeddedDriver();
            try {
                driver.connect(_derbyUrl + ";shutdown=true", new Properties());
            } catch (SQLException ex) {
                // Shutdown will always return an exeption!
                if (ex.getErrorCode() != 45000)
                    __log.error("Error shutting down Derby: " + ex.getErrorCode(), ex);
View Full Code Here

    properties.setPassword("");
  }

  public void shutdown(DataSource dataSource, String databaseName) {
    try {
      new EmbeddedDriver().connect(
          String.format(URL_TEMPLATE, databaseName, SHUTDOWN_COMMAND), new Properties());
    }
    catch (SQLException ex) {
      if (!SHUTDOWN_CODE.equals(ex.getSQLState())) {
        logger.warn("Could not shutdown in-memory Derby database", ex);
View Full Code Here

    @After
    public void tearDown() throws Exception {
        super.tearDown();
       
        try {
            new EmbeddedDriver().connect("jdbc:derby:memory:mybatis;drop=true", new Properties());
        } catch (SQLException ex) {
            if (!"08006".equals(ex.getSQLState())) {
                throw ex;
            }
        }
View Full Code Here

    @After
    public void tearDown() throws Exception {
        super.tearDown();
       
        try {
            new EmbeddedDriver().connect("jdbc:derby:memory:ibatis;drop=true", new Properties());
        } catch (SQLException ex) {
            if (!"08006".equals(ex.getSQLState())) {
                throw ex;
            }
        }
View Full Code Here

                _connectionManager = null;
            }

        if (_needDerbyShutdown) {
            __log.debug("shutting down derby.");
            EmbeddedDriver driver = new EmbeddedDriver();
            try {
                driver.connect(_derbyUrl + ";shutdown=true", new Properties());
            } catch (SQLException ex) {
                // Shutdown will always return an exeption!
                if (ex.getErrorCode() != 45000)
                    __log.error("Error shutting down Derby: " + ex.getErrorCode(), ex);
View Full Code Here

    @After
    public void tearDown() throws Exception {
        super.tearDown();
       
        try {
            new EmbeddedDriver().connect("jdbc:derby:memory:mybatis;drop=true", new Properties());
        } catch (SQLException ex) {
            if (!"08006".equals(ex.getSQLState())) {
                throw ex;
            }
        }
View Full Code Here

    @After
    public void tearDown() throws Exception {
        super.tearDown();
       
        try {
            new EmbeddedDriver().connect("jdbc:derby:memory:ibatis;drop=true", new Properties());
        } catch (SQLException ex) {
            if (!"08006".equals(ex.getSQLState())) {
                throw ex;
            }
        }
View Full Code Here

    private static final Logger log =
        LoggerFactory.getLogger(BackwardsCompatibilityIT.class);

    public void testBackwardsCompatibility() throws Exception {
        // Force loading of the Derby JDBC driver
        new EmbeddedDriver();

        File target = new File("target/backwards-compatibility-test");
        FileUtils.deleteDirectory(target);
        target.mkdirs();
View Full Code Here

                _connectionManager = null;
            }

        if (_needDerbyShutdown) {
            __log.debug("shutting down derby.");
            EmbeddedDriver driver = new EmbeddedDriver();
            try {
                driver.connect(_derbyUrl + ";shutdown=true", new Properties());
            } catch (SQLException ex) {
                // Shutdown will always return an exeption!
                if (ex.getErrorCode() != 45000)
                    __log.error("Error shutting down Derby: " + ex.getErrorCode(), ex);
View Full Code Here

TOP

Related Classes of org.apache.derby.jdbc.EmbeddedDriver

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.