Examples of closeOnCompletion()


Examples of com.alibaba.druid.pool.DruidPooledStatement.closeOnCompletion()

        Assert.assertEquals(1, dataSource.getActiveCount());
        Assert.assertEquals(0, dataSource.getErrorCount());
       
        Exception error = null;
        try {
            stmt.closeOnCompletion();
        } catch (SQLFeatureNotSupportedException e) {
            error = e;
        }
        Assert.assertNotNull(error);
       
View Full Code Here

Examples of java.sql.Statement.closeOnCompletion()

  }

  public static boolean getStandardConformingStrings(Connection con) throws SQLException {

    Statement stmt = con.createStatement();
    stmt.closeOnCompletion();

    ResultSet rs = stmt.executeQuery("SHOW standard_conforming_strings");
    if (rs.next()) {
      return rs.getBoolean(1);
    }
View Full Code Here

Examples of java.sql.Statement.closeOnCompletion()

     * Test the behavior of closeOnCompletion with a single result set
     */
    public void testSingleResultSet() throws SQLException
    {
        Statement stmt = _conn.createStatement();
        stmt.closeOnCompletion();

        ResultSet rs = stmt.executeQuery(TestUtil.selectSQL("table1", "*"));
        rs.close();
        assertTrue(stmt.isClosed());
    }
View Full Code Here

Examples of java.sql.Statement.closeOnCompletion()

     * Test the behavior of closeOnCompletion with a multiple result sets
     */
    public void testMultipleResultSet() throws SQLException
    {
        Statement stmt = _conn.createStatement();
        stmt.closeOnCompletion();

        stmt.execute(TestUtil.selectSQL("table1", "*") + ";" +
                     TestUtil.selectSQL("table1", "*") + ";");
        ResultSet rs = stmt.getResultSet();
        rs.close();
View Full Code Here

Examples of java.sql.Statement.closeOnCompletion()

     * closeOnCompletion has no effect (spec
     */
    public void testNoResultSet() throws SQLException
    {
        Statement stmt = _conn.createStatement();
        stmt.closeOnCompletion();

        stmt.executeUpdate(TestUtil.insertSQL("table1", "1"));
        assertFalse(stmt.isClosed());
    }
}
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.Wrapper41Statement.closeOnCompletion()

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITH autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.Wrapper41Statement.closeOnCompletion()

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITHOUT autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.Wrapper41Statement.closeOnCompletion()

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITH autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.Wrapper41Statement.closeOnCompletion()

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITHOUT autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.Wrapper41Statement.closeOnCompletion()

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITH autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();
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.