Package javax.transaction

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


                    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

                            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

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

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

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

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

         //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

         tm.begin();
        
         Transaction tx = tm.getTransaction();
         tx.enlistResource(res);
        
         tx.delistResource(res, XAResource.TMSUCCESS);
        
         //Then we do a commit
         tm.commit();
                             
         //Then we receive the messages outside the tx
View Full Code Here

         tm.begin();
        
         tx = tm.getTransaction();
         tx.enlistResource(res);
        
         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.