Package javax.transaction

Examples of javax.transaction.TransactionManager.rollback()


      assertTrue(!caches.get(2).exists(oldBackupFqn));
      assertTrue(!caches.get(0).exists(newBackupFqn));
      assertTrue(!caches.get(1).exists(newBackupFqn));
      assertTrue(!caches.get(2).exists(newBackupFqn));

      txman.rollback();

      dumpCacheContents(caches);

      assertTrue(caches.get(0).exists(fqn));
      assertTrue(!caches.get(1).exists(fqn));
View Full Code Here


                  this.e = e;
               }

               try
               {
                  if (tm.getTransaction() != null) tm.rollback();
               }
               catch (Exception e2)
               {
                  log.error("Rollback failed!", e2);
               }
View Full Code Here

               TransactionManager tm = c.getTransactionManager();
               if (tm != null)
               {
                  try
                  {
                     if (tm.getTransaction() != null) tm.rollback();
                  }
                  catch (Exception e)
                  {
                     // error rolling back gtx2EntryMap
                     e.printStackTrace();
View Full Code Here

         System.out.println("Transaction was rolled back, this is correct");
      }
      finally
      {
         tm.resume(tx2);
         tm.rollback();
      }

      // Sleep, as the commit call to cache2 is async
      TestingUtil.sleepThread(1000);
View Full Code Here

            finally
            {
               try
               {
                  if (tm != null)
                     tm.rollback();
               }
               catch (Exception e)
               {
                  // do nothing
               }
View Full Code Here

               c2.put("/a/b/c", "age", 39);
               lock.release();

               TestingUtil.sleepThread(100);
               lock.acquire();
               tm.rollback();
               lock.release();
            }
            catch (Throwable ex)
            {
               ex.printStackTrace();
View Full Code Here

            finally
            {
               try
               {
                  if (tm != null)
                     tm.rollback();
               }
               catch (Exception e)
               {
                  // do nothing
               }
View Full Code Here

         TransactionManager txManager = txManager();
         txManager.resume(localTx.getTransaction());
         if (commit) {
            txManager.commit();
         } else {
            txManager.rollback();
         }
      }

      private void replayModificationsInTransaction(PrepareCommand command, boolean onePhaseCommit) throws Throwable {
         TransactionManager tm = txManager();
View Full Code Here

                  if( replaySuccessful ) {
                     log.tracef("Committing remotely originated tx %s as it is 1PC", command.getGlobalTransaction());
                     tm.commit();
                  } else {
                     log.tracef("Rolling back remotely originated tx %s", command.getGlobalTransaction());
                     tm.rollback();
                  }
               } else { // Wait for a remote commit/rollback.
                  remote2localTx.put(command.getGlobalTransaction(), localTx.getGlobalTransaction());
                  tm.suspend();
               }
View Full Code Here

   {
      TransactionManager tm = c.getTransactionManager();
      try
      {
         if (tm != null && tm.getTransaction() != null)
            tm.rollback();
      }
      catch (Exception e)
      {
      }
      c.stop();
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.