Package javax.transaction

Examples of javax.transaction.TransactionManager.rollback()


        catch( Throwable ignore ) {
          log.trace( "unable to release connection on exception [" + ignore + "]" );
        }
        if ( transacted ) {
          try {
            transactionManager.rollback();
          }
          catch( Throwable ignore ) {
            log.trace( "unable to rollback new transaction on exception [" + ignore + "]" );
          }
        }
View Full Code Here


         case Status.STATUS_MARKED_ROLLBACK:
         case Status.STATUS_PREPARING:
         case Status.STATUS_ROLLING_BACK:
            try
            {
               tm.rollback();
            }
            catch (Exception ex)
            {
               log.error("Failed to rollback", ex);
            }
View Full Code Here

        catch( Throwable ignore ) {
          log.trace( "unable to release connection on exception [" + ignore + "]" );
        }
        if ( transacted ) {
          try {
            transactionManager.rollback();
          }
          catch( Throwable ignore ) {
            log.trace( "unable to rollback new transaction on exception [" + ignore + "]" );
          }
        }
View Full Code Here

         tx.delistResource(res, XAResource.TMSUCCESS);

         tx.delistResource(consumerSess.getXAResource(), XAResource.TMSUCCESS);

         mgr.rollback();

         // Must close consumer first

         consumer.close();
View Full Code Here

         tx.delistResource(res, XAResource.TMSUCCESS);

         tx.delistResource(consumerSess.getXAResource(), XAResource.TMSUCCESS);

         mgr.rollback();

         mgr.begin();

         tx = mgr.getTransaction();
View Full Code Here

         tx.delistResource(res, XAResource.TMSUCCESS);

         tx.delistResource(consumerSess.getXAResource(), XAResource.TMSUCCESS);

         mgr.rollback();

         mgr.begin();

         tx = mgr.getTransaction();
View Full Code Here

      assertEquals("value2", cache1.get(fqn, "key2"));

      txm.begin();
      cache2.put(fqn, "key", "value");
      assertEquals("value", cache2.get(fqn, "key"));
      txm.rollback();

      assertEquals("value2", cache1.get(fqn, "key2"));
      n = cache2.getNode(fqn);
      assertHasBeenInvalidated(n, "Should have been invalidated");
   }
View Full Code Here

      txm.begin();
      cache2.put(fqn, "key", "value");
      assertEquals("value2", cache1.get(fqn, "key2"));
      assertEquals("value", cache2.get(fqn, "key"));
      txm.rollback();

      assertEquals("value2", cache1.get(fqn, "key2"));
      n2 = cache2.getNode(fqn);
      assertHasBeenInvalidated(n2, "Should have been invalidated");
      assertHasBeenInvalidated(cache2.peek(fqn, false, false), "Should have been invalidated");
View Full Code Here

      assertEquals("value", caches.get(0).get(fqn, "key"));

      mgr.begin();
      caches.get(0).put(fqn, "key2", "value2");
      assertEquals("value2", caches.get(0).get(fqn, "key2"));
      mgr.rollback();
      assertEquals("value", caches.get(1).get(fqn, "key"));
      assertEquals("value", caches.get(0).get(fqn, "key"));
      assertNull("Should be null", caches.get(0).get(fqn, "key2"));
      assertNull("Should be null", caches.get(1).get(fqn, "key2"));
   }
View Full Code Here

      mgr.begin();
      caches.get(0).put(fqn, "key2", "value2");
      assertEquals("value2", caches.get(0).get(fqn, "key2"));
      assertNull("Should be null", caches.get(1).get(fqn, "key2"));
      mgr.rollback();
      assertEquals("value", caches.get(1).get(fqn, "key"));
      assertEquals("value", caches.get(0).get(fqn, "key"));
      assertNull("Should be null", caches.get(0).get(fqn, "key2"));
      assertNull("Should be null", caches.get(1).get(fqn, "key2"));
   }
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.