Package org.jboss.test.tm.resource

Examples of org.jboss.test.tm.resource.MTOperation


      {
         runTest(new MTOperation[][]
           {
              {
                 // thread 0
                 new MTOperation(MTOperation.TM_BEGIN, 10),
                 new MTOperation(MTOperation.TM_GET_STATUS),
                 new MTOperation(MTOperation.XX_SLEEP_200), // other thread must commit
                 new MTOperation(MTOperation.TM_GET_STATUS)
              }
              ,
              {
                 // thread 1
                 new MTOperation(MTOperation.XX_WAIT_FOR, 10)
                 new MTOperation(MTOperation.TX_COMMIT, 10, new RollbackException()),
                 new MTOperation(MTOperation.TM_GET_STATUS),
              }
           });        
      }
      else
      {
         runTest(new MTOperation[][]
         {
            {
               // thread 0
               new MTOperation(MTOperation.TM_BEGIN, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
               new MTOperation(MTOperation.XX_SLEEP_200), // other thread must commit
               new MTOperation(MTOperation.TM_GET_STATUS)
            }
            ,
            {
               // thread 1
               new MTOperation(MTOperation.XX_WAIT_FOR, 10)
               new MTOperation(MTOperation.TX_COMMIT, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
            }
         });
      }
   }
View Full Code Here


      {
         runTest(new MTOperation[][]
         {
            {
               // thread 0
               new MTOperation(MTOperation.TM_BEGIN, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
            }
            ,
            {
               // thread 1
               new MTOperation(MTOperation.TM_GET_STATUS),                 
               new MTOperation(MTOperation.XX_WAIT_FOR, 10),              
               new MTOperation(MTOperation.TM_RESUME, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),              
               new MTOperation(MTOperation.TX_COMMIT, 10, new RollbackException()),
               new MTOperation(MTOperation.TM_GET_STATUS),              
            }
         });
      }
      else
      {
         runTest(new MTOperation[][]
           {
              {
                 // thread 0
                 new MTOperation(MTOperation.TM_BEGIN, 10),
                 new MTOperation(MTOperation.TM_GET_STATUS),
              }
              ,
              {
                 // thread 1
                 new MTOperation(MTOperation.TM_GET_STATUS),                 
                 new MTOperation(MTOperation.XX_WAIT_FOR, 10),              
                 new MTOperation(MTOperation.TM_RESUME, 10),
                 new MTOperation(MTOperation.TM_GET_STATUS),              
                 new MTOperation(MTOperation.TX_COMMIT, 10),
                 new MTOperation(MTOperation.TM_GET_STATUS),              
              }
        });
      }
   }
View Full Code Here

      {
         runTest(new MTOperation[][]
         {
            {
               // thread 0
               new MTOperation(MTOperation.TM_BEGIN, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
               new MTOperation(MTOperation.XX_SLEEP_200),
               new MTOperation(MTOperation.TM_GET_STATUS),

               // FIXME - JBTM-558
               new MTOperation(MTOperation.TM_COMMIT, -1, new RollbackException(), false)

            }
            ,
            {
               // thread 1
               new MTOperation(MTOperation.XX_WAIT_FOR, 10)
               new MTOperation(MTOperation.TX_COMMIT, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
            }
         });
      }
   }
View Full Code Here

      {
         runTest(new MTOperation[][]
           {
              {
                 // thread 0
                 new MTOperation(MTOperation.TM_BEGIN, 10),
                 new MTOperation(MTOperation.TM_GET_STATUS),
                 new MTOperation(MTOperation.XX_SLEEP_200), // other thread must commit
                 new MTOperation(MTOperation.TM_GET_STATUS)
              }
              ,
              {
                 // thread 1
                 new MTOperation(MTOperation.XX_WAIT_FOR, 10),
                 new MTOperation(MTOperation.TX_COMMIT, 10, new RollbackException()),
                 new MTOperation(MTOperation.TM_GET_STATUS),
              }
           });
      }
      else
      {
         runTest(new MTOperation[][]
         {
            {
               // thread 0
               new MTOperation(MTOperation.TM_BEGIN, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
               new MTOperation(MTOperation.XX_SLEEP_200), // other thread must commit
               new MTOperation(MTOperation.TM_GET_STATUS)
            }
            ,
            {
               // thread 1
               new MTOperation(MTOperation.XX_WAIT_FOR, 10),
               new MTOperation(MTOperation.TX_COMMIT, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
            }
         });
      }
   }
View Full Code Here

      {
         runTest(new MTOperation[][]
         {
            {
               // thread 0
               new MTOperation(MTOperation.TM_BEGIN, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
            }
            ,
            {
               // thread 1
               new MTOperation(MTOperation.TM_GET_STATUS),
               new MTOperation(MTOperation.XX_WAIT_FOR, 10),
               new MTOperation(MTOperation.TM_RESUME, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
               new MTOperation(MTOperation.TX_COMMIT, 10, new RollbackException()),
               new MTOperation(MTOperation.TM_GET_STATUS),
            }
         });
      }
      else
      {
         runTest(new MTOperation[][]
           {
              {
                 // thread 0
                 new MTOperation(MTOperation.TM_BEGIN, 10),
                 new MTOperation(MTOperation.TM_GET_STATUS),
              }
              ,
              {
                 // thread 1
                 new MTOperation(MTOperation.TM_GET_STATUS),
                 new MTOperation(MTOperation.XX_WAIT_FOR, 10),
                 new MTOperation(MTOperation.TM_RESUME, 10),
                 new MTOperation(MTOperation.TM_GET_STATUS),
                 new MTOperation(MTOperation.TX_COMMIT, 10),
                 new MTOperation(MTOperation.TM_GET_STATUS),
              }
        });
      }
   }
View Full Code Here

      {
         runTest(new MTOperation[][]
         {
            {
               // thread 0
               new MTOperation(MTOperation.TM_BEGIN, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
               new MTOperation(MTOperation.XX_SLEEP_200),
               new MTOperation(MTOperation.TM_GET_STATUS),

               // FIXME - JBTM-558
               new MTOperation(MTOperation.TM_COMMIT, -1, new RollbackException(), false)

            }
            ,
            {
               // thread 1
               new MTOperation(MTOperation.XX_WAIT_FOR, 10),
               new MTOperation(MTOperation.TX_COMMIT, 10),
               new MTOperation(MTOperation.TM_GET_STATUS),
            }
         });
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.tm.resource.MTOperation

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.