Package bitronix.tm

Examples of bitronix.tm.BitronixTransactionManager.suspend()


    public void testSimpleAssertions() throws Exception {
        if (log.isDebugEnabled()) log.debug("*** getting TM");
        BitronixTransactionManager tm = TransactionManagerServices.getTransactionManager();

        assertNull(tm.suspend());

        try {
            tm.resume(null);
            fail("expected InvalidTransactionException");
        } catch (InvalidTransactionException ex) {
View Full Code Here


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

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

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

        connection1.createStatement();
View Full Code Here

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

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

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

        connection1.createStatement();
View Full Code Here

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

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

        if (log.isDebugEnabled()) log.debug("*** before begin2");
        tm.begin();
        if (log.isDebugEnabled()) log.debug("*** after begin2");
        if (log.isDebugEnabled()) log.debug("*** reusing connection 1");
View Full Code Here

        connection1.createStatement();

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

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

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

        if (log.isDebugEnabled()) log.debug("*** closing connection 1 too eagerly");
        try {
View Full Code Here

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

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

        Connection connection2 = poolingDataSource1.getConnection();
        assertNull(tm.getTransaction());
        connection2.createStatement();
        connection2.close();
View Full Code Here

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

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

        if (log.isDebugEnabled()) log.debug(" *** begin interleaved transaction");
        tm.begin();
        Connection connection2 = poolingDataSource1.getConnection();
View Full Code Here

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

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

        if (log.isDebugEnabled()) log.debug(" *** begin interleaved transaction");
        tm.begin();
        Connection connection2 = poolingDataSource1.getConnection();
View Full Code Here

        if (log.isDebugEnabled()) log.debug("*** get C2");
        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();
View Full Code Here

        if (log.isDebugEnabled()) log.debug("*** after begin");

        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");
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.