private void stopServer() { if (server != null) { Server s = server; // avoid calling stop recursively // because stopping the server will // try to close the database as well server = null; s.stop(); } }
@Override public void stop() { if (server != null) { server.stop(); server = null; LOG.info("Embedded database stopped"); } }
@Override public void contextDestroyed(ServletContextEvent servletContextEvent) { try { Statement stat = conn.createStatement(); stat.execute("SHUTDOWN"); stat.close(); } catch (Exception e) { e.printStackTrace(); } try { conn.close(); } catch (Exception e) { e.printStackTrace(); } if (server != null) { server.stop(); server = null; } }
@Override protected void finalize() throws Throwable { if (realH2Server != null) { realH2Server.stop(); } DeleteDbFiles.execute("", "JPADroolsFlow", true); super.finalize(); }
public void shutdown() throws SQLException { if (systemEnvironment.inDbDebugMode()) { LOG.info("Shutting down database server."); if (tcpServer == null) { return; } if (dataSource != null) { dataSource.close(); } dataSource = null; tcpServer.stop(); tcpServer = null; } else { Connection connection = createDataSource().getConnection(); Statement statement = connection.createStatement(); statement.execute("SHUTDOWN"); statement.close(); dataSource.close(); dataSource = null; } }
@Override protected void finalize() throws Throwable { if (realH2Server != null) { realH2Server.stop(); } DeleteDbFiles.execute("", "target/jbpm-test", true); super.finalize(); }
public void stop() { if (server != null) { server.stop(); server.shutdown(); DeleteDbFiles.execute("~", "jbpm-db", true); server = null; } } }
final String newTCPServer = getLocalProperty("newTCPServer"); if ("true".equals(newTCPServer)) { h2.stop(); h2.shutdown();
private void stopServer() { if (server != null) { Server s = server; // avoid calling stop recursively // because stopping the server will // try to close the database as well server = null; s.stop(); } }
@Override public void onApplicationEvent(ContextClosedEvent event) { if (this.server != null) { this.server.stop(); logger.info("Embedded H2 server stopped!"); } } }
public void stop() { if (server != null) { server.stop(); server.shutdown(); DeleteDbFiles.execute("~", "jbpm-db", true); server = null; } } }
@AfterClass public static void teardownH2() { h2Server.stop(); } }
@After public void tearDown() { server.stop(); } @Test
@AfterClass public static void stopH2Database() throws Exception { log.debug("stoping database"); h2Server.stop(); DeleteDbFiles.execute("", "DroolsFlow", true); }
@AfterClass public static void stopH2Database() throws Exception { log.debug("stoping database"); h2Server.stop(); DeleteDbFiles.execute("", "DroolsFlow", true); }
@AfterClass public static void stopH2Database() throws Exception { log.debug("stopping database"); h2Server.stop(); DeleteDbFiles.execute( "", "DroolsFlow", true ); }
@AfterClass public static void stopDBServer() { if (h2Server.isRunning(false)) { h2Server.stop(); } }
public void stop() { if (server != null) { server.stop(); server.shutdown(); DeleteDbFiles.execute("~", "jbpm-db", true); server = null; } } }