Package org.jboss.test.txtimer.interfaces

Examples of org.jboss.test.txtimer.interfaces.TimerSessionHome.create()


      List timerHandles = pp.listTimerHandles();
      assertEquals("unexpected handle count", 0, timerHandles.size());

      InitialContext iniCtx = getInitialContext();
      TimerSessionHome home = (TimerSessionHome)iniCtx.lookup(TimerSessionHome.JNDI_NAME);
      TimerSession session = home.create();
      session.resetCallCount();
      try
      {
         // insert a timer into the db
         ObjectName oname = ObjectNameFactory.create("jboss.j2ee:jndiName=test/txtimer/TimerSession,service=EJB");
View Full Code Here


      {
         super.deploy("ejb-txtimer.jar");
        
         InitialContext iniCtx = getInitialContext();
         TimerSessionHome home = (TimerSessionHome)iniCtx.lookup(TimerSessionHome.JNDI_NAME);
         TimerSession session = home.create();
         session.resetCallCount();
  
         // create a timer to expire in 2sec
         session.createTimer(2000, 0, new SimpleInfo("NonScoped"));
           
View Full Code Here

      {
         super.deploy("ejb-txtimer-scoped.jar");
        
         InitialContext iniCtx = getInitialContext();
         TimerSessionHome home = (TimerSessionHome)iniCtx.lookup(TimerSessionHome.JNDI_NAME);
         TimerSession session = home.create();
         session.resetCallCount();
  
         // create a timer to expire in 2sec, with a SimpleInfo serializable
         session.createTimer(2000, 0, new SimpleInfo("ScopedTest"));
           
View Full Code Here

   public void rollbackAfterCreateSession(long duration)
           throws Exception
   {
      InitialContext iniCtx = new InitialContext();
      TimerSessionHome home = (TimerSessionHome) iniCtx.lookup(TimerSessionHome.JNDI_NAME);
      TimerSession bean = home.create();
      bean.createTimer(duration, 0, null);
      context.setRollbackOnly();
   }

   /**
 
View Full Code Here

   public void rollbackAfterCancelSession()
           throws Exception
   {
      InitialContext iniCtx = new InitialContext();
      TimerSessionHome home = (TimerSessionHome) iniCtx.lookup(TimerSessionHome.JNDI_NAME);
      TimerSession bean = home.create();
      bean.cancelFirstTimer();
      context.setRollbackOnly();
   }

   /**
 
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.