Package javax.transaction.xa

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


  
  
  
         XAResource res = cf.createXAConnection().createXASession().getXAResource();
  
         Xid[] xids = res.recover(XAResource.TMSTARTRSCAN);
         assertEquals(2, xids.length);
  
         Xid[] xids2 = res.recover(XAResource.TMENDRSCAN);
         assertEquals(0, xids2.length);
  
View Full Code Here


         XAResource res = cf.createXAConnection().createXASession().getXAResource();
  
         Xid[] xids = res.recover(XAResource.TMSTARTRSCAN);
         assertEquals(2, xids.length);
  
         Xid[] xids2 = res.recover(XAResource.TMENDRSCAN);
         assertEquals(0, xids2.length);
  
         assertTrue(xids[0].equals(xid1) || xids[1].equals(xid1));
         assertTrue(xids[0].equals(xid2) || xids[1].equals(xid2));
  
View Full Code Here

            return false;

         Xid[] txInDoubt = null;
         try
         {              
            txInDoubt = xares.recover(XAResource.TMSTARTRSCAN);
         }
         catch (XAException e)
         {
            log.error("Cannot start recovering on xares", e);
View Full Code Here

         {
            log.error("Cannot start recovering on xares", e);

            try
            {
               xares.recover(XAResource.TMENDRSCAN);
            }
            catch (Exception e1)
            {
            }
View Full Code Here

         }

         try
         {
            if (xares != null)
               xares.recover(XAResource.TMENDRSCAN);
         }
         catch (XAException e)
         {
            log.error("Cannot finish recovering on xares", e);
         }
View Full Code Here

      {              
         xares = getNewXAResource();

         try
         {
            Xid[] xidsInDoubt = xares.recover(XAResource.TMSTARTRSCAN);

            if (xidsInDoubt != null)
            {
               log.info("There are " + xidsInDoubt.length + " xids in doubt");
View Full Code Here

         finally
         {
            try
            {
               if (xares != null)
                  xares.recover(XAResource.TMENDRSCAN);
            }
            catch (XAException e)
            {
               log.error("Cannot finish recover scan on xares", e);
            }
View Full Code Here

         conn1 = cf.createXAConnection();

         XAResource res = conn1.createXASession().getXAResource();

         Xid[] xids = res.recover(XAResource.TMSTARTRSCAN);
         assertEquals(1, xids.length);

         Xid[] xids2 = res.recover(XAResource.TMENDRSCAN);
         assertEquals(0, xids2.length);
View Full Code Here

         XAResource res = conn1.createXASession().getXAResource();

         Xid[] xids = res.recover(XAResource.TMSTARTRSCAN);
         assertEquals(1, xids.length);

         Xid[] xids2 = res.recover(XAResource.TMENDRSCAN);
         assertEquals(0, xids2.length);

         Xid trailing2 = xids[0];

         assertTrue(trailing.getFormatId() == trailing2.getFormatId());
View Full Code Here

      log.debug("Recover " + providerName);
      XAResource xaResource = getDelegate();
      try
      {
         log.debug("Invoking recover(" + flag + ") on the underlying XAResource.");
         return xaResource.recover(flag);
      }
      catch (XAException e)
      {
         throw check(e);
      }
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.