Package bitronix.tm

Examples of bitronix.tm.BitronixTransactionManager.commit()


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

        if (log.isDebugEnabled()) { log.debug("*** committing"); }
        tm.commit();
        if (log.isDebugEnabled()) { log.debug("*** TX is done"); }

        // check flow
        List orderedEvents = EventRecorder.getOrderedEvents();
        log.info(EventRecorder.dumpToString());
View Full Code Here


        Connection connection2 = poolingDataSource1.getConnection();
        assertEquals(POOL_SIZE -2, getPool(poolingDataSource1).inPoolSize());
        connection2.createStatement();
        connection2.close();
        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);

View Full Code Here

        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());

        // check flow
        List orderedEvents = EventRecorder.getOrderedEvents();
View Full Code Here

        if (log.isDebugEnabled()) { log.debug("*** get C4"); }
        Connection c4 = poolingDataSource1.getConnection();
        c4.createStatement();
        c4.close();

        tm.commit();

        // check flow
        List orderedEvents = EventRecorder.getOrderedEvents();
        log.info(EventRecorder.dumpToString());

View Full Code Here

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

        if (log.isDebugEnabled()) { log.debug("*** committing"); }
        tm.commit();
        if (log.isDebugEnabled()) { log.debug("*** TX is done"); }

        // check flow
        List orderedEvents = EventRecorder.getOrderedEvents();
        log.info(EventRecorder.dumpToString());
View Full Code Here

               
                try {
                    if (log.isDebugEnabled()) { log.debug("*** resuming transaction in new thread"); }
                    tm.resume(suspended);
                    if (log.isDebugEnabled()) { log.debug("*** committing transaction in new thread"); }
                    tm.commit();
                    if (log.isDebugEnabled()) { log.debug("*** new thread commit complete, exiting"); }
                    assertNull(tm.getCurrentTransaction());
                } catch (Exception e) {
                    fail(e.getMessage());
                }
View Full Code Here

        thread.start();
        thread.join();

        assertNotNull(tm.getCurrentTransaction());
        if (log.isDebugEnabled()) { log.debug("*** committing transaction in main thread"); }
        tm.commit();
        if (log.isDebugEnabled()) { log.debug("*** main thread complete"); }
        assertNull(tm.getCurrentTransaction());
    }
}
View Full Code Here

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

        if (log.isDebugEnabled()) { log.debug("*** committing"); }
        tm.commit();
        if (log.isDebugEnabled()) { log.debug("*** TX is done"); }

        // check flow
        List orderedEvents = EventRecorder.getOrderedEvents();
        log.info(EventRecorder.dumpToString());
View Full Code Here

          tm.resume(suspended);
              if (log.isDebugEnabled()) { log.debug("*** getting connection from DS1"); }
              Connection connection = poolingDataSource1.getConnection();
              connection.createStatement();
              twoConnections.add(connection);
              tm.commit();
        } catch (Exception e) {
          e.printStackTrace();
          fail(e.getMessage());
        }
          }
View Full Code Here

        assertNotSame(handle1.getProxiedDelegate(), handle2.getProxiedDelegate());

        connection1.close();
        connection2.close();

        tm.commit();
    }

    public void testSharedConnectionInLocalTransaction() throws Exception {

        if (log.isDebugEnabled()) { log.debug("*** Starting testSharedConnectionInLocalTransaction: getting connection from DS1"); }
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.