Examples of releaseSavePoint()


Examples of java.sql.Connection.releaseSavepoint()

        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
        aes12.resetState();
        try {
            conn.releaseSavepoint((Savepoint)null);
        } catch (SQLException e) {
                assertSQLState("08003", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
View Full Code Here

Examples of java.sql.Connection.releaseSavepoint()

    con.getMetaData();
    conControl.setReturnValue(md, 1);
    for (int i = 1; i <= count; i++) {
      con.setSavepoint(ConnectionHolder.SAVEPOINT_NAME_PREFIX + i);
      conControl.setReturnValue(sp, 1);
      con.releaseSavepoint(sp);
      conControl.setVoidCallable(1);
    }
    con.commit();
    conControl.setVoidCallable(1);
    con.isReadOnly();
View Full Code Here

Examples of java.sql.Connection.releaseSavepoint()

    mdControl.setReturnValue(true, 1);
    con.getMetaData();
    conControl.setReturnValue(md, 1);
    con.setSavepoint("SAVEPOINT_1");
    conControl.setReturnValue(sp, 1);
    con.releaseSavepoint(sp);
    conControl.setVoidCallable(1);
    con.commit();
    conControl.setVoidCallable(1);
    con.isReadOnly();
    conControl.setReturnValue(false, 1);
View Full Code Here

Examples of java.sql.Connection.releaseSavepoint()

     * Test2 - After releasing a savepoint, should be able to reuse it.
     */
    public void testReusingSavepoints() throws SQLException {
        Connection con = getConnection();
        Savepoint savepoint1 = con.setSavepoint("s1");
        con.releaseSavepoint(savepoint1);
        con.setSavepoint("s1");
        con.rollback();
    }

    /**
 
View Full Code Here

Examples of java.sql.Connection.releaseSavepoint()

        // in a different transaction
        con.setSavepoint("s2");
        Statement s = createStatement();
        s.executeUpdate("INSERT INTO T1 VALUES(2,1)");
        try {
            con.releaseSavepoint(savepoint1);
            fail("FAIL 5a - release savepoint from a different transaction "
                    + "did not raise error");
        } catch (SQLException se) {
            // Expected exception.
            assertSQLState("3B001", se);
View Full Code Here

Examples of java.sql.Connection.releaseSavepoint()

     * same name. and release the first one
     */
    public void testReleaseReleasedSavepoint() throws SQLException {
        Connection con = getConnection();
        Savepoint savepoint1 = con.setSavepoint("s1");
        con.releaseSavepoint(savepoint1);
        // The following savepoint was earlier named s1. Changed it to s2 while
        // working on DRDA support
        // for savepoints. The reason for that is as follows
        // The client translates all savepoint jdbc calls to equivalent sql and
        // hence
View Full Code Here

Examples of java.sql.Connection.releaseSavepoint()

        // savepoint named s1.
        con.setSavepoint("s2");
        Statement s = createStatement();
        s.executeUpdate("INSERT INTO T1 VALUES(2,1)");
        try {
            con.releaseSavepoint(savepoint1);
            fail("FAIL 6a - releasing a released savepoint did not raise error");
        } catch (SQLException se) {
            // Expected exception.
            assertSQLState("3B001", se);
        }
View Full Code Here

Examples of java.sql.Connection.releaseSavepoint()

     * same name. and rollback the first one
     */
    public void testRollbackReleasedSavepoint() throws SQLException {
        Connection con = getConnection();
        Savepoint savepoint1 = con.setSavepoint("s1");
        con.releaseSavepoint(savepoint1);
        // The following savepoint was earlier named s1. Changed it to s2 while
        // working on DRDA support
        // for savepoints. The reason for that is as follows
        // The client translates all savepoint jdbc calls to equivalent sql and
        // hence
View Full Code Here

Examples of java.sql.Connection.releaseSavepoint()

        Savepoint savepoint1 = con.setSavepoint("s1");
        Statement s = createStatement();
        s.executeUpdate("INSERT INTO T1 VALUES(2,1)");
        Connection con2 = openDefaultConnection();
        try {
            con2.releaseSavepoint(savepoint1);
            fail("FAIL 6c - releasing another transaction's savepoint did "
                    + "not raise error");
        } catch (SQLException se) {
            // Expected exception.
            if (usingEmbedded()) {
View Full Code Here

Examples of java.sql.Connection.releaseSavepoint()

     * Test 12 releasing a savepoint multiple times - should not work
     */
    public void testReleaseMultipleTimes() throws SQLException {
        Connection con = getConnection();
        Savepoint savepoint1 = con.setSavepoint("MyName");
        con.releaseSavepoint(savepoint1);
        try {
            con.releaseSavepoint(savepoint1);
            fail("FAIL 12 releasing a savepoint multiple times should fail");
        } catch (SQLException se) {
            // Expected exception.
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.