Package javax.transaction.xa

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


        } 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


        } 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

                    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

        } 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

    {
        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

                    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

        } 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.