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


            // Commit or rollback depending on the status
            if (commit == false || transaction.getStatus() == Status.STATUS_MARKED_ROLLBACK)
            {
               if (trace)
                  log.trace("MessageEndpoint " + getProxyString(proxy) + " rollback");
               tm.rollback();
            }
            else
            {
               if (trace)
                  log.trace("MessageEndpoint " + getProxyString(proxy) + " commit");
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

      {
         session = runMyStatefulTest();
      }
      finally
      {
         tm.rollback();
      }
      try
      {
         session.remove();
         fail("Should have thrown NoSuchEJBException");
View Full Code Here

      cache.getNotifier().addCacheListener(new ExceptionListener());
      TransactionManager tm = startTransaction();
      try
      {
         cache.put(FQN_A, null);
         tm.rollback();
      }
      catch (RuntimeException ex)
      {
         tm.rollback();
      }
View Full Code Here

         cache.put(FQN_A, null);
         tm.rollback();
      }
      catch (RuntimeException ex)
      {
         tm.rollback();
      }
      assertFalse(cache.exists(FQN_A));
      assertEquals(0, cache.getNumberOfLocksHeld());
   }
View Full Code Here

            {
               if (tx2 != null)
               {
                  try
                  {
                     mgr.rollback();
                  }
                  catch (SystemException e)
                  {
                     e.printStackTrace();
                  }
View Full Code Here

      TransactionManager mgr = cache1.getConfiguration().getRuntimeConfig().getTransactionManager();
      mgr.begin();

      cache1.put(fqn, "key1", "val1");
      assertTrue(cache1.exists(fqn));
      mgr.rollback();
      assertFalse(cache1.getCacheLoaderManager().getCacheLoader().exists(fqn));
      assertFalse(cache1.exists(fqn));
      cache1.put("/a/b/c", null);// should be run outside a TX !
      assertTrue(cache1.exists("/a/b/c"));
   }
View Full Code Here

      mgr.begin();
      cache1.put(fqn, key, "value3");
      assertEquals("value3", cache1.get(fqn, key));
      assertEquals("value2", cache2.get(fqn, key));

      mgr.rollback();

      assertEquals("value2", cache1.get(fqn, key));
      assertEquals("value2", cache2.get(fqn, key));
   }
View Full Code Here

         case Status.STATUS_MARKED_ROLLBACK:
         case Status.STATUS_PREPARING:
         case Status.STATUS_ROLLING_BACK:
            try
            {
               tm.rollback();
            }
            catch (Exception sex)
            {
               log.error("Failed to rollback", sex);
            }
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.