Package org.jboss.test.txtimer.interfaces

Examples of org.jboss.test.txtimer.interfaces.TimerTest


   public void testCreateNeverCancelRequiresNew() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;
         int canceledTimerCount;
        
         initialTimerCount = getTimerCount();
         session.startTimerInTxNever();
         createdTimerCount = getTimerCount();
         assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
         session.cancelTimerInTxRequiresNew();
         canceledTimerCount = getTimerCount();
         assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
      }
      finally
      {
         session.remove();
      }
   }
View Full Code Here


  
   public void testCreateNeverCancelNotSupported() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;
         int canceledTimerCount;
        
         initialTimerCount = getTimerCount();
         session.startTimerInTxNever();
         createdTimerCount = getTimerCount();
         assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
         session.cancelTimerInTxNotSupported();
         canceledTimerCount = getTimerCount();
         assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
      }
      finally
      {
         session.remove();
      }
   }
View Full Code Here

  
   public void testCreateNeverCancelNever() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;
         int canceledTimerCount;
        
         initialTimerCount = getTimerCount();
         session.startTimerInTxNever();
         createdTimerCount = getTimerCount();
         assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
         session.cancelTimerInTxNever();
         canceledTimerCount = getTimerCount();
         assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
      }
      finally
      {
         session.remove();
      }
   }
View Full Code Here

  
   public void testCreateRequiredCancelRequired() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;
         int canceledTimerCount;
        
         initialTimerCount = getTimerCount();
         session.startTimerInTxRequired();
         createdTimerCount = getTimerCount();
         assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
         session.cancelTimerInTxRequired();
         canceledTimerCount = getTimerCount();
         assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
      }
      finally
      {
         session.remove();
      }
   }
View Full Code Here

   public void testCreateRequiredCancelRequiresNew() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;
         int canceledTimerCount;
        
         initialTimerCount = getTimerCount();
         session.startTimerInTxRequired();
         createdTimerCount = getTimerCount();
         assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
         session.cancelTimerInTxRequiresNew();
         canceledTimerCount = getTimerCount();
         assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
      }
      finally
      {
         session.remove();
      }
   }
View Full Code Here

  
   public void testCreateRequiredCancelNotSupported() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;
         int canceledTimerCount;
        
         initialTimerCount = getTimerCount();
         session.startTimerInTxRequired();
         createdTimerCount = getTimerCount();
         assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
         session.cancelTimerInTxNotSupported();
         canceledTimerCount = getTimerCount();
         assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
      }
      finally
      {
         session.remove();
      }
   }
View Full Code Here

  
   public void testCreateRequiredCancelNever() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;
         int canceledTimerCount;
        
         initialTimerCount = getTimerCount();
         session.startTimerInTxRequired();
         createdTimerCount = getTimerCount();
         assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
         session.cancelTimerInTxNever();
         canceledTimerCount = getTimerCount();
         assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
      }
      finally
      {
         session.remove();
      }
   }
View Full Code Here

   public void testCreateRequiresNewCancelRequired() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;
         int canceledTimerCount;
        
         initialTimerCount = getTimerCount();
         session.startTimerInTxRequiresNew();
         createdTimerCount = getTimerCount();
         assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
         session.cancelTimerInTxRequired();
         canceledTimerCount = getTimerCount();
         assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
      }
      finally
      {
         session.remove();
      }
   }
View Full Code Here

   public void testCreateRequiresNewCancelRequiresNew() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;
         int canceledTimerCount;
        
         initialTimerCount = getTimerCount();
         session.startTimerInTxRequiresNew();
         createdTimerCount = getTimerCount();
         assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
         session.cancelTimerInTxRequiresNew();
         canceledTimerCount = getTimerCount();
         assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
      }
      finally
      {
         session.remove();
      }
   }
View Full Code Here

  
   public void testCreateRequiresNewCancelNotSupported() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;
         int canceledTimerCount;
        
         initialTimerCount = getTimerCount();
         session.startTimerInTxRequiresNew();
         createdTimerCount = getTimerCount();
         assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
         session.cancelTimerInTxNotSupported();
         canceledTimerCount = getTimerCount();
         assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
      }
      finally
      {
         session.remove();
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.txtimer.interfaces.TimerTest

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.