Package org.jboss.test.cluster.invokerha.InvokerHaTransactionalMockUtils

Examples of org.jboss.test.cluster.invokerha.InvokerHaTransactionalMockUtils.MockUserTransaction


     
      try
      {
         createNewProxies(0, policyClass, true);

         UserTransaction ut = new MockUserTransaction(clientUserTransactionProxy, infrastructure);
         ut.begin();
         performTransactionalStickyCalls(3, null, policyClass, newProxiesInBetweenTransactions);
         ut.commit();
         /* either set would do because they should be the same */
         Set<Object> chosenTargetsTx1 = chosenTargets;;
        
         if (newProxiesInBetweenTransactions)
         {
            createNewProxies(0, policyClass, false);
         }
        
         ut.begin();
         performTransactionalStickyCalls(3, null, policyClass, newProxiesInBetweenTransactions);
         ut.commit();
         /* either set would do because they should be the same */
         Set<Object> chosenTargetsTx2 = chosenTargets;
        
         assertChosenTargetsInBetweenTx(policyClass, chosenTargetsTx1, chosenTargetsTx2, newProxiesInBetweenTransactions);
      }
View Full Code Here


      log.debug("transactional calls with node shutdown [policy=" + policyClass + "]");
     
      try
      {
         createNewProxies(0, policyClass, true);
         UserTransaction ut = new MockUserTransaction(clientUserTransactionProxy, infrastructure);
         ut.begin();
         performTransactionalCallsWithNodeShutdown(null, policyClass);
         ut.commit();
      }
      catch(Exception e)
      {
         /* catching to log the error properly (JUnit in eclipse does not show
          * correctly exceptions from invokers) and fail */
 
View Full Code Here

      createNewProxies(0, policyClass, true);
     
      try
      {
         /* fail in 1st call */
         UserTransaction ut = new MockUserTransaction(clientUserTransactionProxy, infrastructure);
         ut.begin();
         failureCall(failureType, true, policyClass, newProxiesInBetweenFailures);
         ut.commit();
        
         if (newProxiesInBetweenFailures)
         {
            createNewProxies(0, policyClass, false);           
         }
        
         /* fail in Nth call */
         ut.begin();
         failureCall(failureType, false, policyClass, newProxiesInBetweenFailures);
         ut.commit();
      }
      catch(Exception e)
      {
         /* catching to log the error properly (JUnit in eclipse does not show
          * correctly exceptions from invokers) and fail */
 
View Full Code Here

TOP

Related Classes of org.jboss.test.cluster.invokerha.InvokerHaTransactionalMockUtils.MockUserTransaction

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.