Package javax.transaction

Examples of javax.transaction.Transaction.rollback()


                  if (s_logger.isDebugEnabled() && !m_bStealth)
                  {
                     s_logger.debug("Rolling back transaction " + tx);
                  }

                  tx.rollback();
               }
               catch (Throwable x)
               {
                  if (s_logger.isWarnEnabled() && !m_bStealth)
                  {
View Full Code Here


                  {
                     m_txManager.rollback();
                  }
                  else
                  {
                     tx.rollback();
                  }

               }
               catch (Throwable t)
               {
View Full Code Here

    public void rollback ( String tid ) throws RemoteException,
            IllegalStateException, SecurityException, SystemException
    {
        Transaction tx = tm_.getPreviousInstance ( tid );
        if ( tx != null ) {
            tx.rollback ();
        }
    }

    /**
     * @see UserTransactionServer
View Full Code Here

           SystemException
   {
      Transaction tx = getTransaction();
      if (tx == null)
         throw new IllegalStateException("no transaction associated with thread");
      tx.rollback();

      // Disassociate tx from thread.
      setTransaction(null);
   }
View Full Code Here

               ex_ = e;
               e.printStackTrace();
               if(transaction_)
               {
                  try {
                     tx.rollback();
                  } catch (SystemException e1) {
                     e1.printStackTrace();
                     ex_ = e1;
                  }
               }
View Full Code Here

      log.debug("cache locks after restart:\n" + cache.printLockInfo());

      assertEquals(4, cache.getNumberOfLocksHeld());
      assertTrue(cache.getNumberOfNodes() > 0);

      tx.rollback();
      assertEquals(0, cache.getNumberOfLocksHeld());
   }

   public void testStartNoCreate() throws Exception {
      TreeCache cache=createCache(TreeCache.LOCAL);
View Full Code Here

               ex_ = e;
               e.printStackTrace();
               if(transaction)
               {
                  try {
                     tx.rollback();
                  } catch (SystemException e1) {
                     e1.printStackTrace();
                     ex_ = e1;
                  }
               }
View Full Code Here

                                " by " + gtx + " by rolling back local tx");
                     // This thread has to join the tx
                     tm.resume(tx);
                     try
                     {
                        tx.rollback();
                     }
                     finally
                     {
                        tm.suspend();
                     }
View Full Code Here

      mgr.begin();
      Transaction tx=mgr.getTransaction();

      cache1.put(fqn, "key1", "val1");
      assertTrue(cache1.exists(fqn));
      tx.rollback();
      assertFalse(cache1.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

               exceptions.add(e);
            }
            finally {
               try
               {
                  if (tx != null) tx.rollback();
               }
               catch (Exception e)
               {

               }
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.