Package javax.transaction

Examples of javax.transaction.Transaction.delistResource()


    public void testOnePhaseCommiTwoResources() throws Exception {
        tm.begin();
        Transaction tx = tm.getTransaction();
        tx.enlistResource(mr11);
        tx.delistResource(mr11, XAResource.TMSUSPEND);
        tx.enlistResource(mr12);
        tx.delistResource(mr12, XAResource.TMSUSPEND);
        tm.commit();
    }
    public void testTwoPhaseCommit() throws Exception {
View Full Code Here


        tm.begin();
        Transaction tx = tm.getTransaction();
        tx.enlistResource(mr11);
        tx.delistResource(mr11, XAResource.TMSUSPEND);
        tx.enlistResource(mr12);
        tx.delistResource(mr12, XAResource.TMSUSPEND);
        tm.commit();
    }
    public void testTwoPhaseCommit() throws Exception {
        tm.begin();
        Transaction tx = tm.getTransaction();
View Full Code Here

    }
    public void testTwoPhaseCommit() throws Exception {
        tm.begin();
        Transaction tx = tm.getTransaction();
        tx.enlistResource(mr11);
        tx.delistResource(mr11, XAResource.TMSUSPEND);
        tx.enlistResource(mr21);
        tx.delistResource(mr21, XAResource.TMSUSPEND);
        tm.commit();
    }
    public void testTwoPhaseCommit4Resources() throws Exception {
View Full Code Here

        tm.begin();
        Transaction tx = tm.getTransaction();
        tx.enlistResource(mr11);
        tx.delistResource(mr11, XAResource.TMSUSPEND);
        tx.enlistResource(mr21);
        tx.delistResource(mr21, XAResource.TMSUSPEND);
        tm.commit();
    }
    public void testTwoPhaseCommit4Resources() throws Exception {
        tm.begin();
        Transaction tx = tm.getTransaction();
View Full Code Here

    }
    public void testTwoPhaseCommit4Resources() throws Exception {
        tm.begin();
        Transaction tx = tm.getTransaction();
        tx.enlistResource(mr11);
        tx.delistResource(mr11, XAResource.TMSUSPEND);
        tx.enlistResource(mr12);
        tx.delistResource(mr12, XAResource.TMSUSPEND);
        tx.enlistResource(mr21);
        tx.delistResource(mr21, XAResource.TMSUSPEND);
        tx.enlistResource(mr22);
View Full Code Here

        tm.begin();
        Transaction tx = tm.getTransaction();
        tx.enlistResource(mr11);
        tx.delistResource(mr11, XAResource.TMSUSPEND);
        tx.enlistResource(mr12);
        tx.delistResource(mr12, XAResource.TMSUSPEND);
        tx.enlistResource(mr21);
        tx.delistResource(mr21, XAResource.TMSUSPEND);
        tx.enlistResource(mr22);
        tx.delistResource(mr22, XAResource.TMSUSPEND);
        tm.commit();
View Full Code Here

        tx.enlistResource(mr11);
        tx.delistResource(mr11, XAResource.TMSUSPEND);
        tx.enlistResource(mr12);
        tx.delistResource(mr12, XAResource.TMSUSPEND);
        tx.enlistResource(mr21);
        tx.delistResource(mr21, XAResource.TMSUSPEND);
        tx.enlistResource(mr22);
        tx.delistResource(mr22, XAResource.TMSUSPEND);
        tm.commit();
    }
View Full Code Here

        tx.enlistResource(mr12);
        tx.delistResource(mr12, XAResource.TMSUSPEND);
        tx.enlistResource(mr21);
        tx.delistResource(mr21, XAResource.TMSUSPEND);
        tx.enlistResource(mr22);
        tx.delistResource(mr22, XAResource.TMSUSPEND);
        tm.commit();
    }

}
View Full Code Here

        tm.begin();
        tx = tm.getTransaction();
        assertNull(res1.getCurrentXid());
        assertTrue(tx.enlistResource(res1));
        assertNotNull(res1.getCurrentXid());
        assertTrue(tx.delistResource(res1, XAResource.TMFAIL));
        assertNull(res1.getCurrentXid());
        tm.rollback();

        tm.begin();
        tx = tm.getTransaction();
View Full Code Here

    public void testOneResourceCommit() throws Exception {
        assertEquals(Status.STATUS_NO_TRANSACTION, tm.getStatus());
        tm.begin();
        Transaction tx = tm.getTransaction();
        tx.enlistResource(r1_1);
        tx.delistResource(r1_1, XAResource.TMSUCCESS);
        tx.commit();
        assertEquals(Status.STATUS_NO_TRANSACTION, tm.getStatus());
        assertTrue(r1_1.isCommitted());
        assertTrue(!r1_1.isPrepared());
        assertTrue(!r1_1.isRolledback());
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.