Package org.jboss.test.jbossts.recovery

Examples of org.jboss.test.jbossts.recovery.TestASRecovery


      return "Passed";
   }

   public String testXA(ASFailureSpec... specs)
   {
      TestASRecovery xatest = new TestASRecovery();
      String txStatus = getStatus(context.getUserTransaction());

      if (txStatus != null)
         log.info("BMT method called with tx status: " + txStatus);

      log.info("BMT testXA called with " + specs.length + " specs");

      for (ASFailureSpec spec : specs)
         xatest.addResource(spec);

      return xatest.startTest() ? "Passed" : "Failed";
   }
View Full Code Here


   @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
   public String testXA(ASFailureSpec... specs)
   {
      log.info("CMT testXA called with " + specs.length + " specs");

      TestASRecovery xatest = new TestASRecovery();
      Transaction tx;

      try
      {
         tx = com.arjuna.ats.jta.TransactionManager.transactionManager().getTransaction();
      }
      catch (javax.transaction.SystemException e)
      {
         tx = null;
      }

      if (tx == null)
      {
         log.error("CMT testXA called without a transaction");

         return "Failed";
      }
      else
      {
         for (ASFailureSpec spec : specs)
            xatest.addResource(spec);

         xatest.startTest(tx);

         return "Passed";
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.jbossts.recovery.TestASRecovery

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.