Examples of EJBTimerService


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

            deploymentsById.put(deploymentId, deploymentInfo);
            deploymentsByClass.put(deploymentInfo.getCmpImplClass(), deploymentInfo);
            deploymentInfo.setContainer(this);
        }

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

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

            timerService.start();
        }
    }

    public void undeploy(DeploymentInfo deploymentInfo) throws OpenEJBException {
        EjbTimerService timerService = deploymentInfo.getEjbTimerService();
        if (timerService != null) {
            timerService.stop();
        }
        undeploy((CoreDeploymentInfo)deploymentInfo);
    }
View Full Code Here

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

        CoreDeploymentInfo deploymentInfo = threadContext.getDeploymentInfo();
        Object primaryKey = threadContext.getPrimaryKey();

        // stop timers
        if (primaryKey != null && deploymentInfo.getEjbTimerService() != null) {
            EjbTimerService timerService = deploymentInfo.getEjbTimerService();
            if (timerService != null && timerService instanceof EjbTimerServiceImpl) {
                for (Timer timer : deploymentInfo.getEjbTimerService().getTimers(primaryKey)) {
                    timer.cancel();
                }
            }
View Full Code Here

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

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

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

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

        undeploy((CoreDeploymentInfo)info);
    }

    private void undeploy(CoreDeploymentInfo deploymentInfo) {
        instanceManager.undeploy(deploymentInfo);
        EjbTimerService timerService = deploymentInfo.getEjbTimerService();
        if (timerService != null) {
            timerService.stop();
        }

        synchronized (this) {
            String id = (String) deploymentInfo.getDeploymentID();
            deploymentInfo.setContainer(null);
View Full Code Here

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

        }

        public TimerService getTimerService() throws IllegalStateException {
            ThreadContext threadContext = ThreadContext.getThreadContext();
            DeploymentInfo deploymentInfo = threadContext.getDeploymentInfo();
            EjbTimerService timerService = deploymentInfo.getEjbTimerService();
            if (timerService == null) {
                throw new IllegalStateException("This ejb does not support timers " + deploymentInfo.getDeploymentID());
            }
            return new TimerServiceImpl(timerService, threadContext.getPrimaryKey());
        }
View Full Code Here

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

            deploymentRegistry.put((String)deploymentInfo.getDeploymentID(), deploymentInfo);
            deploymentInfo.setContainer(this);
        }
        instanceManager.deploy(info);

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

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

            timerService.start();
        }
    }

    public void undeploy(DeploymentInfo info) throws OpenEJBException {
        EjbTimerService timerService = info.getEjbTimerService();
        if (timerService != null) {
            timerService.stop();
        }

        instanceManager.undeploy(info);

        synchronized (this) {
View Full Code Here

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

        CoreDeploymentInfo deploymentInfo = threadContext.getDeploymentInfo();
        Object primaryKey = threadContext.getPrimaryKey();

        // if we have a real timerservice, stop all timers. Otherwise, ignore...
        if (primaryKey != null) {
            EjbTimerService timerService = deploymentInfo.getEjbTimerService();
            if (timerService != null && timerService instanceof EjbTimerServiceImpl) {
                for (Timer timer : deploymentInfo.getEjbTimerService().getTimers(primaryKey)) {
                    timer.cancel();
                }
            }
View Full Code Here

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

            throw new OpenEJBException(e);
        }

        // start the timer service
        EjbTimerService timerService = deploymentInfo.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.