Package bitronix.tm

Examples of bitronix.tm.BitronixTransactionManager.resume()


        BitronixTransactionManager tm = TransactionManagerServices.getTransactionManager();

        assertNull(tm.suspend());

        try {
            tm.resume(null);
            fail("expected InvalidTransactionException");
        } catch (InvalidTransactionException ex) {
            assertEquals("resumed transaction cannot be null", ex.getMessage());
        }
View Full Code Here


        if (log.isDebugEnabled()) log.debug("*** suspending");
        Transaction t1 = tm.suspend();

        if (log.isDebugEnabled()) log.debug("*** resuming");
        tm.resume(t1);

        connection1.createStatement();

        if (log.isDebugEnabled()) log.debug("*** closing connection 1");
        connection1.close();
View Full Code Here

        if (log.isDebugEnabled()) log.debug("*** suspending");
        Transaction t1 = tm.suspend();

        if (log.isDebugEnabled()) log.debug("*** resuming");
        tm.resume(t1);

        connection1.createStatement();

        if (log.isDebugEnabled()) log.debug("*** closing connection 1");
        connection1.close();
View Full Code Here

        if (log.isDebugEnabled()) log.debug("*** rolling back");
        tm.rollback();
        if (log.isDebugEnabled()) log.debug("*** rolling back");

        if (log.isDebugEnabled()) log.debug("*** subTX is done");
        tm.resume(t1);

        if (log.isDebugEnabled()) log.debug("*** closing connection 1");
        connection1.close();

        if (log.isDebugEnabled()) log.debug("*** committing");
 
View Full Code Here

        assertFalse(connection1.isClosed());

        assertEquals(POOL_SIZE -1, getPool(poolingDataSource1).inPoolSize());

        if (log.isDebugEnabled()) log.debug("*** resuming");
        tm.resume(t1);

        assertEquals(POOL_SIZE -1, getPool(poolingDataSource1).inPoolSize());

        if (log.isDebugEnabled()) log.debug("*** committing");
        tm.commit();
View Full Code Here

        assertNull(tm.getTransaction());
        connection2.createStatement();
        connection2.close();

        if (log.isDebugEnabled()) log.debug("*** resuming");
        tm.resume(t1);

        if (log.isDebugEnabled()) log.debug("*** closing connection 1");
        connection1.close();

        if (log.isDebugEnabled()) log.debug("*** committing");
 
View Full Code Here

        connection2.close();
        if (log.isDebugEnabled()) log.debug(" *** commit interleaved transaction");
        tm.commit();

        if (log.isDebugEnabled()) log.debug(" *** resuming transaction");
        tm.resume(t1);

        if (log.isDebugEnabled()) log.debug("*** closing connection 1");
        connection1.close();

        if (log.isDebugEnabled()) log.debug("*** committing");
 
View Full Code Here

        if (log.isDebugEnabled()) log.debug(" *** commit interleaved transaction");
        tm.commit();
        assertEquals(POOL_SIZE -1, getPool(poolingDataSource1).inPoolSize());

        if (log.isDebugEnabled()) log.debug(" *** resuming transaction");
        tm.resume(t1);

        if (log.isDebugEnabled()) log.debug("*** committing");
        tm.commit();
        if (log.isDebugEnabled()) log.debug("*** TX is done");
        assertEquals(POOL_SIZE, getPool(poolingDataSource1).inPoolSize());
View Full Code Here

        Connection c2 = poolingDataSource2.getConnection();
        c2.createStatement();
        c2.close();

        Transaction tx = tm.suspend();
        tm.resume(tx);

        if (log.isDebugEnabled()) log.debug("*** get C3");
        Connection c3 = poolingDataSource2.getConnection();
        c3.createStatement();
        c3.close();
View Full Code Here

        if (log.isDebugEnabled()) log.debug("*** getting connection from DS1");
        Connection connection1 = poolingDataSource1.getConnection();

        Transaction tx = tm.suspend();
        tm.resume(tx);

        connection1.prepareStatement("some sql");

        if (log.isDebugEnabled()) log.debug("*** closing connection 1");
        connection1.close();
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.