@Override public boolean isClosed() throws SQLException { return targetStatement.isClosed(); }
@Override public boolean isClosed() throws SQLException { return statement.isClosed(); }
private void closeStatement(Statement stmt) { try { if (stmt != null && !stmt.isClosed()) { stmt.close(); } } catch (Exception ex) { throw new TransactionIOException(ex); } }
@Override public boolean statement_isClosed(StatementProxy statement) throws SQLException { if (this.pos < filterSize) { return nextFilter().statement_isClosed(this, statement); } return statement.getRawObject().isClosed(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { stmt = DriverManager.getConnection(URL).createStatement(); assert stmt != null; assert !stmt.isClosed(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { stmt = DriverManager.getConnection(BASE_URL).createStatement(); assert stmt != null; assert !stmt.isClosed(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { Connection conn = DriverManager.getConnection(URL); conn.setSchema('"' + DEFAULT_CACHE_NAME + '"'); stmt = conn.createStatement(); assert stmt != null; assert !stmt.isClosed(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { Connection conn = DriverManager.getConnection(URL); conn.setSchema('"' + CACHE_NAME + '"'); stmt = conn.createStatement(); assert stmt != null; assert !stmt.isClosed(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { Connection conn = DriverManager.getConnection(URL); conn.setSchema("\"pers\""); stmt = conn.createStatement(); assert stmt != null; assert !stmt.isClosed(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { conn = DriverManager.getConnection(URL); conn.setSchema('"' + DEFAULT_CACHE_NAME + '"'); stmt = conn.createStatement(); assert stmt != null; assert !stmt.isClosed(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { if (stmt != null) { stmt.getConnection().close(); stmt.close(); assert stmt.isClosed(); } }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { if (stmt != null) { stmt.getConnection().close(); stmt.close(); assert stmt.isClosed(); } }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { if (stmt != null) { stmt.getConnection().close(); stmt.close(); assert stmt.isClosed(); } }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { if (stmt != null) { stmt.getConnection().close(); stmt.close(); assert stmt.isClosed(); } }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { if (stmt != null) { stmt.getConnection().close(); stmt.close(); assert stmt.isClosed(); } }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { if (stmt != null) { stmt.getConnection().close(); stmt.close(); assert stmt.isClosed(); } }
/** * @throws Exception If failed. */ @org.junit.Test public void testCloseResultSetByConnectionClose() throws Exception { ResultSet rs = stmt.executeQuery(SQL); conn.close(); assert stmt.isClosed() : "Statement must be implicitly closed after close connection"; assert rs.isClosed() : "ResultSet must be implicitly closed after close connection"; }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); stmt = conn.createStatement(); assertNotNull(stmt); assertFalse(stmt.isClosed()); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); stmt = conn.createStatement(); prepStmt = conn.prepareStatement(SQL_PREPARED); assertNotNull(stmt); assertFalse(stmt.isClosed()); assertNotNull(prepStmt); assertFalse(prepStmt.isClosed()); }