Package javax.transaction

Examples of javax.transaction.Transaction.delistResource()


         count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");

         assertEquals(1, count.intValue());

         trans.delistResource(resouce, XAResource.TMSUCCESS);

         tm.rollback();

         tm.begin();
         trans = tm.getTransaction();
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
         tm.rollback();

         count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
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();

         // I have changed where this begin was originally set
View Full Code Here

         Message rm3 = cons.receive(1000);

         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);
View Full Code Here

         tm.begin();

         Transaction tx = tm.getTransaction();
         tx.enlistResource(res);
         tx.delistResource(res, XAResource.TMSUCCESS);

         // Then we do a rollback
         tm.rollback();

         tm.begin();
View Full Code Here

         assertEquals("message2", rm2.getText());

         Message rm3 = cons.receive(1000);

         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);
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.