Package bitronix.tm

Examples of bitronix.tm.BitronixTransactionManager.resume()


        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

            public void run() {
                if (log.isDebugEnabled()) { log.debug("*** getting TM"); }
               
                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) {
View Full Code Here

        final ArrayList twoConnections = new ArrayList();
        Thread thread1 = new Thread() {
          public void run() {
            try {
          tm.resume(suspended);
              if (log.isDebugEnabled()) { log.debug("*** getting connection from DS1"); }
              Connection connection = poolingDataSource1.getConnection();
              connection.createStatement();
              twoConnections.add(connection);
        } catch (Exception e) {
View Full Code Here

        thread1.join();

        Thread thread2 = new Thread() {
          public void run() {
            try {
          tm.resume(suspended);
              if (log.isDebugEnabled()) { log.debug("*** getting connection from DS1"); }
              Connection connection = poolingDataSource1.getConnection();
              connection.createStatement();
              twoConnections.add(connection);
              tm.commit();
View Full Code Here

        tm.commit();

        assertEquals(POOL_SIZE -1, pool1.inPoolSize());

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

        assertEquals(POOL_SIZE -1, pool1.inPoolSize());

        if (log.isDebugEnabled()) { log.debug("*** committing"); }
        tm.commit();
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.