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

            throw new OpenEJBException(e);
        }

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

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

            deploymentsById.put(deploymentId, beanContext);
            beansByClass.put(beanContext.getCmpImplClass(), 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) throws OpenEJBException {
        EjbTimerService timerService = beanContext.getEjbTimerService();
        if (timerService != null) {
            timerService.stop();
        }
        synchronized (this) {
            deploymentsById.remove(beanContext.getDeploymentID());
            beansByClass.remove(beanContext.getCmpImplClass());
View Full Code Here

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

        BeanContext beanContext = threadContext.getBeanContext();
        Object primaryKey = threadContext.getPrimaryKey();

        // stop timers
        if (primaryKey != null && beanContext.getEjbTimerService() != null) {
            EjbTimerService timerService = beanContext.getEjbTimerService();
            if (timerService != null && timerService instanceof EjbTimerServiceImpl) {
                for (Timer timer : beanContext.getEjbTimerService().getTimers(primaryKey)) {
                    timer.cancel();
                }
            }
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.apache.openejb.core.timer.EjbTimerService

            throw new OpenEJBException(e);
        }

        // start the timer service
        EjbTimerService timerService = beanContext.getEjbTimerService();
        if (timerService != null) {
            timerService.start();
        }
    }
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
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.