Examples of delistResource()


Examples of bitronix.tm.BitronixTransaction.delistResource()

                if (!xaResourceHolderState.isEnded()) {
                    if (log.isDebugEnabled()) log.debug("delisting resource " + xaResourceHolderState + " from " + currentTransaction);

                    // Watch out: the delistResource() call might throw a BitronixRollbackSystemException to indicate a unilateral rollback.
                    currentTransaction.delistResource(xaResourceHolderState.getXAResource(), XAResource.TMSUCCESS);
                }
                else if (log.isDebugEnabled()) log.debug("avoiding delistment of not enlisted resource " + xaResourceHolderState);
            }

        } // isInEnlistingGlobalTransactionContext
View Full Code Here

Examples of com.sun.enterprise.transaction.api.JavaEETransactionManager.delistResource()

    public void delistResource(ResourceHandle h, int xaresFlag) {
        try {
        JavaEETransactionManager tm = ConnectorRuntime.getRuntime().getTransactionManager();
            Transaction tran = tm.getTransaction();
      if (tran != null) {
                tm.delistResource(tran, h, xaresFlag);
            }   
        } catch (SystemException ex) {
            _logger.log(Level.WARNING,"poolmgr.system_exception",ex);
        } catch (IllegalStateException ex) {
            // ignore
View Full Code Here

Examples of javax.transaction.Transaction.delistResource()

        } catch (SystemException e) {
            this.logger.error("Pool: getTransaction failed:", e);
        }
        if (tx != null && mc.isClosed()) {
            try {
                tx.delistResource(mc.getXAResource(), flag);
            } catch (Exception e) {
                this.logger.error("Pool: Exception while delisting resource:", e);
            }
        }
        return true;
View Full Code Here

Examples of javax.transaction.Transaction.delistResource()

                    try {
                        switch (getTransactionManager().getStatus()) {
                        case STATUS_ACTIVE:
                            // Delist XA Resource
                            if (xaResource != null) {
                                transactionAfter.delistResource(xaResource, XAResource.TMSUCCESS);
                            }
                            getTransactionManager().commit();
                            break;
                        case STATUS_MARKED_ROLLBACK:
                            // Delist XA Resource
View Full Code Here

Examples of javax.transaction.Transaction.delistResource()

                            getTransactionManager().commit();
                            break;
                        case STATUS_MARKED_ROLLBACK:
                            // Delist XA Resource
                            if (xaResource != null) {
                                transactionAfter.delistResource(xaResource, XAResource.TMFAIL);
                            }
                            getTransactionManager().rollback();
                            break;
                        default:
                            throw new RuntimeException("Unexpected transaction status" + getTransactionManager().getStatus());
View Full Code Here

Examples of javax.transaction.Transaction.delistResource()

           
            tx.enlistResource(dummy);
           
            assertEquals(1, rm.size());
           
            tx.delistResource(res, XAResource.TMSUCCESS);
           
            tx.delistResource(dummy, XAResource.TMSUCCESS);
           
            tm.commit();
         }                 
View Full Code Here

Examples of javax.transaction.Transaction.delistResource()

           
            assertEquals(1, rm.size());
           
            tx.delistResource(res, XAResource.TMSUCCESS);
           
            tx.delistResource(dummy, XAResource.TMSUCCESS);
           
            tm.commit();
         }                 
        
         assertEquals(1, rm.size());
View Full Code Here

Examples of javax.transaction.Transaction.delistResource()

           
            tx.enlistResource(dummy);
           
            assertEquals(1, rm.size());
           
            tx.delistResource(res, XAResource.TMSUCCESS);
           
            tx.delistResource(dummy, XAResource.TMSUCCESS);
           
            tm.rollback();
         }                 
View Full Code Here

Examples of javax.transaction.Transaction.delistResource()

           
            assertEquals(1, rm.size());
           
            tx.delistResource(res, XAResource.TMSUCCESS);
           
            tx.delistResource(dummy, XAResource.TMSUCCESS);
           
            tm.rollback();
         }                 
        
         assertEquals(1, rm.size());
View Full Code Here

Examples of javax.transaction.Transaction.delistResource()

         //of Mark Little's book Java Transaction processing
         //for a discussion of how different app serves deal with this)
         //The way jboss messaging (and jboss mq) deals with this is to convert any work done
         //prior to when the xasession is enlisted in the tx, into work done in the xa tx
        
         tx.delistResource(res, XAResource.TMSUCCESS);
        
         //Now rollback the tx - this should cause redelivery of the two messages
         tx.rollback();
        
         rm1 = (TextMessage)cons.receive(1000);
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.