Package javax.ejb

Examples of javax.ejb.TimerService


/*     */     public TimerService getTimerService(ObjectName containerId, Object instancePk)
/*     */       throws IllegalStateException
/*     */     {
/*     */       try
/*     */       {
/* 141 */         TimerService timerService = this.mbeanEjbTimerService.getTimerService(containerId, instancePk);
/* 142 */         return timerService;
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/* 146 */         EJBTimerServiceLocator.log.error("Cannot getTimerService", e);
View Full Code Here


/*     */         try
/*     */         {
/* 212 */           TimedObjectId targetId = handle.getTimedObjectId();
/* 213 */           ObjectName containerName = targetId.getContainerId();
/* 214 */           ContainerMBean container = (ContainerMBean)MBeanProxyExt.create(ContainerMBean.class, containerName, this.server);
/* 215 */           TimerService timerService = container.getTimerService(targetId.getInstancePk());
/* 216 */           timerService.createTimer(handle.getFirstTime(), handle.getPeriode(), handle.getInfo());
/*     */         }
/*     */         catch (Exception e)
/*     */         {
/* 220 */           log.warn("Unable to restore timer record: " + handle);
/*     */         }
View Full Code Here

{
   private static Logger log = Logger.getLogger(JBossTimerServiceFactory.class);
  
   public TimerService createTimerService(TimedObjectInvoker invoker)
   {
      TimerService timerService = null;
      try
      {
         EJBTimerService service = getEJBTimerService();
         ObjectName objectName = new ObjectName(invoker.getTimedObjectId());
         org.jboss.ejb.txtimer.TimedObjectInvoker bridge = new TimedObjectInvokerBridge(invoker);
         TimerService delegate = service.createTimerService(objectName, null, bridge);
         timerService = new TimerServiceFacade(objectName, delegate);
      }
      catch (Exception e)
      {
         //throw new EJBException("Could not create timer service", e);
View Full Code Here

TOP

Related Classes of javax.ejb.TimerService

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.