Package javax.transaction

Examples of javax.transaction.Transaction.rollback()


   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


  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

            tx = tm.getTransaction();
            if (tx != null)
            {
               try
               {
                  tx.rollback();
               }
               finally
               {
                  tm.suspend();
               }
View Full Code Here

      {     
         if (started != null)
         {
            try
            {
               started.rollback();
            }
            catch (Exception e)
            {
               log.error("Failed to rollback", e);
            }
View Full Code Here

        
         tx.delistResource(res, XAResource.TMSUCCESS);
        
         tx.delistResource(consumerSess.getXAResource(), XAResource.TMSUCCESS);
        
         tx.rollback();
        
         mgr.begin();
        
         tx = mgr.getTransaction();
        
View Full Code Here

        
         tx.delistResource(res, XAResource.TMSUCCESS);
        
         tx.delistResource(consumerSess.getXAResource(), XAResource.TMSUCCESS);
        
         tx.rollback();
        
         mgr.begin();
        
         tx = mgr.getTransaction();
        
View Full Code Here

                 
         tx.delistResource(res, XAResource.TMSUCCESS);
        
         tx.delistResource(consumerSess.getXAResource(), XAResource.TMSUCCESS);
        
         tx.rollback();
        
         log.info("Closing the consumer");
        
         //Must close consumer first
        
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

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

        currentTransaction.rollback();

    }


    /**
 
View Full Code Here

    public void testTxOp() throws Exception {
        Transaction tx;
        tm.begin();
        tx = tm.getTransaction();
        tx.rollback();
        assertEquals(Status.STATUS_NO_TRANSACTION, tx.getStatus());
        assertEquals(Status.STATUS_NO_TRANSACTION, tm.getStatus());

        tm.begin();
        assertFalse(tx.equals(tm.getTransaction()));
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.