Examples of EjbTimerService


Examples of com.caucho.ejb.timer.EjbTimerService

      _bean = managedBean;

      _timeoutMethod = getTimeoutMethod(_bean.getBeanClass());

      if (_timeoutMethod != null)
        _timerService = new EjbTimerService(_manager);

      // Injection binding occurs in the start phase

      // _resourceProgram = _manager.getResourceProgram(_ejbClass);
View Full Code Here

Examples of com.sun.ejb.containers.EJBTimerService

        if( !afterSetContext ) {
            throw new java.lang.IllegalStateException("Operation not allowed");
        }

        EJBTimerService timerService = EJBTimerService.getValidEJBTimerService();
        return new EJBTimerServiceWrapper(timerService, this);
    }
View Full Code Here

Examples of com.sun.ejb.containers.EJBTimerService

        ConnectorRuntime connectorRuntime = ejbContainerUtil.getServices().getService(ConnectorRuntime.class);
        timerDataSource = DataSource.class.cast(connectorRuntime.lookupNonTxResource(resource_name, false));
    }

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

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

Examples of com.sun.ejb.containers.EJBTimerService

            logger.log(Level.INFO, "[DistributedEJBTimerService] migrating timers from " + serverId);
        }

        int result = 0;
        // Force loading TimerService if it hadn't been started
        EJBTimerService ejbTimerService = EJBTimerService.getEJBTimerService();
        if (ejbTimerService != null && ejbTimerService.isPersistent()) {
            result = ejbTimerService.migrateTimers( serverId );
        } else {
            //throw new IllegalStateException("EJB Timer service is null. "
                    //+ "Cannot migrate timers for: " + serverId);
        }
       
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.EjbTimerService

            // Get the timer data source name from the domain.xml
            ServerContext sc = ApplicationServer.getServerContext();
            EjbContainer ejbc = ServerBeansFactory.
                getConfigBean(sc.getConfigContext()).getEjbContainer();
            EjbTimerService ejbt = ejbc.getEjbTimerService();
            // EjbTimerService is an optional element
            String ejbtDatasource = (ejbt != null) ?
                ejbt.getTimerDatasource() : null;

            // Override the timer datasource with the one from domain.xml
            // if necessary. 
            if( (ejbtDatasource != null) &&
                (!ejbtDatasource.equals(cmpResourceJndiName)) ) {
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.EjbTimerService

           
            // Check for property settings from domain.xml
            ServerContext sc = ApplicationServer.getServerContext();
            EjbContainer ejbc = ServerBeansFactory.
                getConfigBean(sc.getConfigContext()).getEjbContainer();
            EjbTimerService ejbt = ejbc.getEjbTimerService();

            if( ejbt != null ) {

                String valString = ejbt.getMinimumDeliveryIntervalInMillis();
                long val = (valString != null) ?
                    Long.parseLong(valString) : -1;
                   
                if( val > 0 ) {
                    minimumDeliveryInterval_ = val;
                }

                valString = ejbt.getMaxRedeliveries();
                val = (valString != null) ? Long.parseLong(valString) : -1;
                // EJB 2.1 specification minimum is 1
                if( val > 0 ) {
                    maxRedeliveries_ = val;
                }

                valString = ejbt.getRedeliveryIntervalInternalInMillis();
                val = (valString != null) ? Long.parseLong(valString) : -1;
                if( val > 0 ) {
                    redeliveryInterval_ = val;
                }
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

            throw new OpenEJBException(e);
        }

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

        if (deploymentInfo.isLoadOnStartup()){
            try {
                ThreadContext callContext = new ThreadContext(deploymentInfo, null);
View Full Code Here

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

            instanceManager.freeInstance(threadContext);
        } finally{
            ThreadContext.exit(old);
        }
        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
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.