Examples of EJBTimerService


Examples of org.apache.openejb.core.timer.EjbTimerService

            instanceManager.freeInstance(threadContext);
        } finally{
            ThreadContext.exit(old);
        }
       
        EjbTimerService timerService = beanContext.getEjbTimerService();
        if (timerService != null) {
            timerService.stop();
        }
       
        instanceManager.undeploy(beanContext);
       
        synchronized (this) {
View Full Code Here

Examples of org.apache.openejb.core.timer.EjbTimerService

    public TimerService getTimerService() throws IllegalStateException {
        check(Call.getTimerService);

        ThreadContext threadContext = ThreadContext.getThreadContext();
        BeanContext beanContext = threadContext.getBeanContext();
        EjbTimerService timerService = beanContext.getEjbTimerService();
        if (timerService == null) {
            throw new IllegalStateException("This ejb does not support timers " + beanContext.getDeploymentID());
        }
        return new TimerServiceImpl(timerService, threadContext.getPrimaryKey(), beanContext.getEjbTimeout());
    }
View Full Code Here

Examples of org.apache.openejb.core.timer.EjbTimerService

        synchronized (this) {
            deploymentRegistry.put(id, beanContext);
            beanContext.setContainer(this);
        }

        EjbTimerService timerService = beanContext.getEjbTimerService();
        if (timerService != null) {
            timerService.start();
        }
    }
View Full Code Here

Examples of org.apache.openejb.core.timer.EjbTimerService

    public void stop(BeanContext beanContext) throws OpenEJBException {
    }
   
    public void undeploy(BeanContext beanContext) {
       
        EjbTimerService timerService = beanContext.getEjbTimerService();
        if (timerService != null) {
            timerService.stop();
        }
       
        instanceManager.undeploy(beanContext);
       
        synchronized (this) {
View Full Code Here

Examples of org.glassfish.ejb.config.EjbTimerService

    static void initEJBTimerService(String target) {
        EJBTimerService ts = null;

        EjbContainerUtil _ejbContainerUtil = EjbContainerUtilImpl.getInstance();
        EjbTimerService _ejbt = _ejbContainerUtil.getEjbTimerService(target);
        String resourceName = getTimerResource(_ejbt);

        File root = _ejbContainerUtil.getServerContext().getInstallRoot();
        boolean is_upgrade = isUpgrade(resourceName, _ejbt, root);
View Full Code Here

Examples of org.jboss.ejb.txtimer.EJBTimerService

   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

Examples of org.jboss.ejb.txtimer.EJBTimerService

   protected void removeTimerService(ObjectName containerId)
   {
      try
      {
         EJBTimerService service = getEJBTimerService();
         service.removeTimerService(containerId, true);
      }
      catch (Exception e)
      {
         //throw new EJBException("Could not remove timer service", e);
         if (log.isTraceEnabled())
View Full Code Here

Examples of org.jboss.ejb.txtimer.EJBTimerService

      final boolean trace = log.isTraceEnabled();
      if (trace)
      {
         log.trace("Check whether all timers are cancelled or expired for this entity: " + id);
      }
      final EJBTimerService service = container.getTimerService();
      final ObjectName containerId = container.getJmxName();
     
      AccessController.doPrivileged(new PrivilegedAction<Object>()
      {
         public Object run()
         {
            TimerService timerService = service.getTimerService(containerId, id);
            if (timerService != null && timerService.getTimers().isEmpty())
            {
               // Assuming that active timers do not include cancelled or expired ones.
               if (trace)
               {
                  log.trace("No active timers available for " + containerId + " and primary key " + id);
               }
               service.removeTimerService(containerId, id);
            }
            return null;
         }
      });
   }
View Full Code Here

Examples of org.jboss.ejb.txtimer.EJBTimerService

      boolean trace = log.isTraceEnabled();
      if (trace)
      {
         log.trace("Check whether all timers are cancelled or expired for this entity: " + ctx);
      }
      EJBTimerService service = m_container.getTimerService();
      ObjectName containerId = m_container.getJmxName();
      Object pKey = ctx.getId();
      TimerService timerService = service.getTimerService(containerId, pKey);
      if (timerService != null && timerService.getTimers().isEmpty())
      {
         // Assuming that active timers do not include cancelled or expired ones.
         if (trace)
         {
            log.trace("No active timers available for " + containerId + " and primary key " + pKey);
         }
         service.removeTimerService(containerId, pKey);
      }
   }
View Full Code Here

Examples of org.jboss.ejb.txtimer.EJBTimerService

   public TimerService createTimerService(Container container, TimedObjectInvoker invoker)
   {
      TimerService timerService = null;
      try
      {
         EJBTimerService service = getEJBTimerService();
         TimerService delegate = service.createTimerService(container.getObjectName(), null, invoker);
         timerService = new TimerServiceFacade(container, delegate);
      }
      catch (Exception e)
      {
         //throw new EJBException("Could not create timer service", e);
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.