Package javax.transaction

Examples of javax.transaction.Transaction.rollback()


            if (beanTransaction == null) {
                return;
            }

            try {
                beanTransaction.rollback();
            } catch (Exception e) {
                logger.error("Error rolling back suspended transaction for discarded stateful session bean instance");
            }
        }
    }
View Full Code Here


        Transaction tx = getTransaction();
        if (tx == null) {
            throw new IllegalStateException("No transaction associated with current thread");
        }
        try {
            tx.rollback();
        } finally {
            unassociate();
        }
    }
View Full Code Here

                     }
                     // This thread has to join the tx
                     tm.resume(tx);
                     try
                     {
                        tx.rollback();
                     }
                     finally
                     {
                        tm.suspend();
                     }
View Full Code Here

      {
         if (started != null)
         {
            try
            {
               started.rollback();
            }
            catch (Exception e)
            {
               JMSBridgeTest.log.error("Failed to rollback", e);
            }
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

         cache = null;
      }

      // BW. kind of a hack to destroy jndi binding and thread local tx before next run.
      Transaction c = TransactionSetup.getManager().getTransaction();
      if (c != null) c.rollback();

      if (tx != null)
      {
         try
         {
View Full Code Here

      {
         public void run()
         {
            try
            {
               t.rollback();
            }
            catch (Exception e)
            {
               exceptions.add(e);
            }
View Full Code Here

         assertNull(rm3);

         tx.delistResource(res, XAResource.TMSUCCESS);

         //Now rollback the tx - this should cause redelivery of the two messages
         tx.rollback();

         rm1 = (TextMessage)cons.receive(1000);

         assertNotNull(rm1);
View Full Code Here

         assertNull(rm3);
         tx.delistResource(res, XAResource.TMSUCCESS);

         //Now rollback the tx - this should cause redelivery of the two messages
         tx.rollback();

         rm1 = (TextMessage)cons.receive(1000);

         assertNotNull(rm1);
View Full Code Here

      {     
         if (started != null)
         {
            try
            {
               started.rollback();
            }
            catch (Exception e)
            {
               log.error("Failed to rollback", 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.