Package javax.transaction.xa

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


    {
        XAResource xaResource = getXAResource();
        int xaRetVal = XAResource.XA_OK;

        try {
            xaResource.forget(xid);
            if (SanityManager.DEBUG)
            {
                connThread.trace("forgot xa transaction: xaRetVal=" + xaRetVal);
            }
        } catch (XAException xe)
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

        } 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

         HornetQJMSLogger.LOGGER.debug("Forget " + xaResource + " xid ");
      }

      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

               //System.out.println("Xid="+list[i].toString());
               try {
                    xaRes.rollback(list[i]);
               } catch (XAException e) {
                //  System.out.println("Forgetting");
                    xaRes.forget(list[i]);
               }
           }
        } finally {
            if (xaCon != null) {
                xaCon.close();
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

                    resource.rollback(tid);
                }
                catch (XAException ex) {
                    try {
                        LOG.debug("Caught exception during rollback: " + ex + " forgetting transaction " + tid);
                        resource.forget(tid);
                    }
                    catch (XAException ex1) {
                        LOG.debug("rollback/forget failed: " + ex1.errorCode);
                    }
                }
View Full Code Here

      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

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.