Package javax.transaction

Examples of javax.transaction.Transaction.rollback()


         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

         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

  public void rollback() throws IllegalStateException, SecurityException, SystemException {
      Transaction tx = getCurrentTransaction();
        if ( tx == null ) {
      throw new IllegalStateException( "no current transaction" );
    }
        tx.rollback();
  }

  public void setRollbackOnly() throws IllegalStateException, SystemException {
      Transaction tx = getCurrentTransaction();
        if ( tx == null ) {
View Full Code Here

        String logMessage = Messages.format
            (SlideTransactionManager.class.getName() + ".rollback",
             currentTransaction.toString());
        logger.log(logMessage, LOG_CHANNEL, Logger.DEBUG);

        currentTransaction.rollback();

    }


    /**
 
View Full Code Here

            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

   public void rollback() throws IllegalStateException, SecurityException,
                                 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

            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

            try
            {
               synchronized (transaction)
               {
                  if (TxUtils.isActive(tx))
                     tx.rollback();
               }
            }
            catch (Exception ignored)
            {
            }
View Full Code Here

            try
            {
               synchronized (transaction)
               {
                  if (TxUtils.isActive(tx))
                     tx.rollback();
               }
            }
            catch (Exception ignored)
            {
            }
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.