Package org.jboss.ejb.txtimer

Examples of org.jboss.ejb.txtimer.TimedObjectId


   }

   protected TimerService createTimerService(TimedObject timedObject)
   {
      SimpleTimedObjectInvoker invoker = new SimpleTimedObjectInvoker();
      TimedObjectId timedObjectId = invoker.addTimedObject(timedObject);
      ObjectName containerId = timedObjectId.getContainerId();
      Object instancePk = timedObjectId.getInstancePk();
      return ejbTimerService.createTimerService(containerId, instancePk, invoker);
   }
View Full Code Here


      TimerEntity entity = home.create(new Integer(1));
      try
      {
         // insert a timer into the db
         ObjectName oname = ObjectNameFactory.create("jboss.j2ee:jndiName=test/txtimer/TimerEntity,service=EJB");
         TimedObjectId targetId = new TimedObjectId(oname, new Integer(1));
         pp.insertTimer("pk1", targetId, new Date(), 0, null);
         sleep(500);

         timerHandles = pp.listTimerHandles();
         assertEquals("unexpected handle count", 1, timerHandles.size());
View Full Code Here

      session.resetCallCount();
      try
      {
         // insert a timer into the db
         ObjectName oname = ObjectNameFactory.create("jboss.j2ee:jndiName=test/txtimer/TimerSession,service=EJB");
         TimedObjectId targetId = new TimedObjectId(oname);
         pp.insertTimer("pk1", targetId, new Date(), 0, null);
         sleep(500);

         timerHandles = pp.listTimerHandles();
         assertEquals("unexpected handle count", 1, timerHandles.size());
View Full Code Here

      assertEquals("unexpected handle count", 0, timerHandles.size());

      // insert a timer into the db
      String timerId = "pk1";
      ObjectName oname = ObjectNameFactory.create("jboss.j2ee:jndiName=test/txtimer/TimerEntity,service=EJB");
      TimedObjectId targetId = new TimedObjectId(oname, new Integer(100));
      Date firstEvent = new Date ();
      String info = "info";
      pp.insertTimer(timerId, targetId, firstEvent, 100, info);

      timerHandles = pp.listTimerHandles();
View Full Code Here

   }

   protected TimerService createTimerService(TimedObject timedObject)
   {
      SimpleTimedObjectInvoker invoker = new SimpleTimedObjectInvoker();
      TimedObjectId timedObjectId = invoker.addTimedObject(timedObject);
      ObjectName containerId = timedObjectId.getContainerId();
      Object instancePk = timedObjectId.getInstancePk();
      return ejbTimerService.createTimerService(containerId, instancePk, invoker);
   }
View Full Code Here

      timedObject.ejbTimeout(timer);
   }

   public TimedObjectId addTimedObject(TimedObject timedObject)
   {
      timedObjectId = new TimedObjectId(ObjectNameFactory.create("txtimer:timedObject=" + timedObject.hashCode()));
      objectMap.put(timedObjectId, timedObject);
      return timedObjectId;
   }
View Full Code Here

TOP

Related Classes of org.jboss.ejb.txtimer.TimedObjectId

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.