Package javax.transaction.xa

Examples of javax.transaction.xa.XAResource.forget()


      assertNull(xar2.recover(XAResource.TMNOFLAGS));
      assertNull(xar2.recover(XAResource.TMENDRSCAN));
      recoveredXid = xidArray[0];
      assertTrue(recoveredXid.equals(makeXid(1)));
     
      xar2.forget(recoveredXid);
     
     
      //Now test to see that it has been forgotten.
      xidArray = xar2.recover(XAResource.TMSTARTRSCAN);
      assertNotNull(xidArray);
View Full Code Here


   {
      HornetQXAResourceWrapper.log.debug("Forget " + connectorFactoryClassName + " xid ");
      XAResource xaResource = getDelegate();
      try
      {
         xaResource.forget(xid);
      }
      catch (XAException e)
      {
         throw check(e);
      }
View Full Code Here

   {
      XAResource xaResource = getDelegate(false);
      HornetQXAResourceWrapper.log.debug("Forget " + xaResource + " xid ");
      try
      {
         xaResource.forget(xid);
      }
      catch (XAException e)
      {
         throw check(e);
      }
View Full Code Here

        } catch (XAException e) {
            if (e.errorCode != XAException.XAER_NOTA)
                throw e;
        }
        try {
            xar.forget(xid11);
        } catch (XAException e) {
            if (e.errorCode != XAException.XAER_NOTA)
                throw e;
        }
    }
View Full Code Here

        Statement s = conn.createStatement();
        s.executeUpdate("CREATE TABLE Derby1016 (I INT)");
        xar.end(xid, XAResource.TMSUCCESS);
        xar.prepare(xid);
        try {
            xar.forget(xid);
            fail("FAIL: prepared XA-Transaction forgotten");
        } catch (XAException XAeForget) {
            assertEquals("FAIL: Got unexpected exception "
                          + XAeForget.getMessage()   + " errorCode: "
                          + XAeForget.errorCode  + "  calling forget on a prepared transaction",
View Full Code Here

        xar.prepare(xid);
        xar.commit(xid, false);
        try {
            // since the transaction was committed, it should no longer exist
            // thus, forget should now throw an XAER_NOTA
            xar.forget(xid);
            fail("FAIL: able to forget committed XA-Transaction");
        } catch (XAException XAeForget) {
            assertEquals("FAIL: Got unexpected exception "
                          + XAeForget.getMessage()   + " errorCode: "
                          + XAeForget.errorCode  + "  calling forget on a committed transaction",
View Full Code Here

         HornetQXAResourceWrapper.log.debug("Forget " + xaResource + " xid ");
      }

      try
      {
         xaResource.forget(xid);
      }
      catch (XAException e)
      {
         throw check(e);
      }
View Full Code Here

   {
      log.debug("Forget " + providerName + " xid ");
      XAResource xaResource = getDelegate();
      try
      {
         xaResource.forget(xid);
      }
      catch (XAException e)
      {
         throw check(e);
      }
View Full Code Here

   {
      XAResource xaResource = getDelegate(false);
      HornetQJMSLogger.LOGGER.debug("Forget " + xaResource + " xid ");
      try
      {
         xaResource.forget(xid);
      }
      catch (XAException e)
      {
         throw check(e);
      }
View Full Code Here

        } catch (SQLException sqlEx) {
          // we expect an exception here
          assertEquals("2D000", sqlEx.getSQLState());
        }
      } finally {
        xaRes1.forget(xid);
      }
    } finally {
      if (xaConn1 != null) {
        try {
          xaConn1.close();
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.