Package com.arjuna.ats.jta.xa

Examples of com.arjuna.ats.jta.xa.XidImple


        assertEquals(javax.transaction.Status.STATUS_ROLLEDBACK, tm.getStatus());
    }

    public void testRollbackSyncViaXATerminator() throws Exception
    {
        final Xid xid = new XidImple(new Uid());
        final Transaction t = SubordinationManager.getTransactionImporter().importTransaction(xid);
        final TestSynchronization sync = new TestSynchronization();
        t.registerSynchronization(sync);
        final XATerminator xaTerminator = SubordinationManager.getXATerminator();
        xaTerminator.rollback(xid);
View Full Code Here


        assertEquals(javax.transaction.Status.STATUS_COMMITTED, tm.getStatus());
    }

    public void testTwoPhaseCommitSyncViaXATerminator() throws Exception
    {
        final Xid xid = new XidImple(new Uid());
        final Transaction t = SubordinationManager.getTransactionImporter().importTransaction(xid);
        final TestSynchronization sync = new TestSynchronization();
        t.registerSynchronization(sync);
        final XATerminator xaTerminator = SubordinationManager.getXATerminator();
        assertEquals(XAResource.XA_RDONLY, xaTerminator.prepare(xid));
View Full Code Here

        assertEquals(javax.transaction.Status.STATUS_COMMITTED, tm.getStatus());
    }

    public void testTwoPhaseCommitSyncWithXAOKViaXATerminator() throws Exception
    {
        final Xid xid = new XidImple(new Uid());
        final Transaction t = SubordinationManager.getTransactionImporter().importTransaction(xid);
        final TestSynchronization sync = new TestSynchronization();
        t.registerSynchronization(sync);
        final TestXAResource xaResource = new TestXAResource();
        xaResource.setPrepareReturnValue(XAResource.XA_OK);
View Full Code Here

        assertEquals(javax.transaction.Status.STATUS_ROLLEDBACK, tm.getStatus());
    }

    public void testTwoPhaseCommitSyncWithRollbackOnlyViaXATerminator() throws Exception
    {
        final Xid xid = new XidImple(new Uid());
        final Transaction t = SubordinationManager.getTransactionImporter().importTransaction(xid);
        final TestSynchronization sync = new TestSynchronization();
        t.registerSynchronization(sync);
        t.setRollbackOnly();
        final XATerminator xaTerminator = SubordinationManager.getXATerminator();
View Full Code Here

    Xid xid = baseXid();

    if (xid != null)
      return xid;

    xid = new XidImple(_theTransaction, branch);

    if (theModifier != null)
    {
      try
      {
View Full Code Here

  {
    super(actUid, null);
   
    // convert to internal format (makes saving/restoring easier)
   
    _theXid = new XidImple(xid);
  }
View Full Code Here

     
      boolean haveXid = os.unpackBoolean();

      if (haveXid)
      {
        _theXid = new XidImple();
       
        _theXid.unpackFrom(os);
      }
     
      return super.restore_state(os, ot);
View Full Code Here

    * {@inheritDoc}
    */
   @Override
   public Xid createXid()
   {
      return new XidImple();
   }
View Full Code Here

         XAResource res1 = sess1.getXAResource();

         XAResource res2 = sess2.getXAResource();

         // Pretend to be a transaction manager by interacting through the XAResources
         Xid xid1 = new XidImple(new Uid("cadaver"), new Uid("bq1"), 666);
         Xid xid2 = new XidImple(new Uid("dalidom"), new Uid("bq2"), 661); // TODO

         // Send a message in each tx

         res1.start(xid1, XAResource.TMNOFLAGS);
View Full Code Here

         XAResource res1 = sess1.getXAResource();
  
         XAResource res2 = sess2.getXAResource();
  
         //Pretend to be a transaction manager by interacting through the XAResources
         Xid xid1 = new XidImple(new Uid("cadaver"), new Uid("bq1"), 666);
         Xid xid2 = new XidImple(new Uid("dalidom"), new Uid("bq2"), 661);   // TODO
  
  
         //    Send a message in each tx
  
         res1.start(xid1, XAResource.TMNOFLAGS);
View Full Code Here

TOP

Related Classes of com.arjuna.ats.jta.xa.XidImple

Copyright © 2018 www.massapicom. 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.