Package com.sun.enterprise.config.serverbeans

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


           
            // 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

    private boolean isUpgrade(String resource, String target, boolean upgrade_with_load) {
        boolean upgrade = false;

        Property prop = null;
        EjbTimerService ejbt = getEjbTimerService(target);
        if (ejbt != null) {
            List<Property> properties = ejbt.getProperty();
            if (properties != null) {
                for (Property p : properties) {
                    if (p.getName().equals(EjbContainerUtil.TIMER_SERVICE_UPGRADED)) {
                        String value = p.getValue();
                        if (value != null && "false".equals(value)) {
View Full Code Here

        return getTimerResource(null);
    }

    private String getTimerResource(String target) {
        String resource = null;
        EjbTimerService ejbt = getEjbTimerService(target);
        if (ejbt != null) {
            if (ejbt.getTimerDatasource() != null) {
                resource = ejbt.getTimerDatasource();
                if (_logger.isLoggable(Level.FINE)) {
                    _logger.fine("Found Timer Service resource name " + resource);
                }
            } else {
                resource = EjbContainerUtil.TIMER_RESOURCE_JNDI;
View Full Code Here

        }
        return resource;
    }

    private EjbTimerService getEjbTimerService(String target) {
        EjbTimerService ejbt = null;
        if (target == null) {
            if (_logger.isLoggable(Level.FINE)) {
                _logger.fine("Looking for current instance ejb-container config");
            }
            ejbt = getEjbContainer().getEjbTimerService();
View Full Code Here

        try {
           
            // Check for property settings from domain.xml
            EjbContainer ejbc = ejbContainerUtil.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;
                }

                // If the system property com.sun.ejb.timer.ReadDBBeforeTimeout
                // is defined by the user use that the value of the flag
                // performDBReadBeforeTimeout
                foundSysPropDBReadBeforeTimeout =
                    getDBReadBeforeTimeoutProperty();

                // The default value for ReadDBBeforeTimeout in case of PE
                // is false. For SE/EE the correct default would set when the
                // EJBLifecyleImpl gets created as part of the EE lifecycle module
                setPerformDBReadBeforeTimeout( false );

                operationOnConnectionFailure = ejbt.getPropertyValue(ON_CONECTION_FAILURE);
                rescheduleFailedTimer = Boolean.valueOf(ejbt.getPropertyValue(RESCHEDULE_FAILED_TIMER));

                // Load confing listener
                ejbContainerUtil.getDefaultHabitat().getComponent(EJBTimerServiceConfigListener.class);
            }
View Full Code Here

    private boolean isUpgrade(String resource, String target, boolean upgrade_with_load) {
        boolean upgrade = false;

        Property prop = null;
        EjbTimerService ejbt = getEjbTimerService(target);
        if (ejbt != null) {
            List<Property> properties = ejbt.getProperty();
            if (properties != null) {
                for (Property p : properties) {
                    if (p.getName().equals(EjbContainerUtil.TIMER_SERVICE_UPGRADED)) {
                        String value = p.getValue();
                        if (value != null && "false".equals(value)) {
View Full Code Here

        return getTimerResource(null);
    }

    private String getTimerResource(String target) {
        String resource = null;
        EjbTimerService ejbt = getEjbTimerService(target);
        if (ejbt != null) {
            if (ejbt.getTimerDatasource() != null) {
                resource = ejbt.getTimerDatasource();
                if (_logger.isLoggable(Level.FINE)) {
                    _logger.fine("Found Timer Service resource name " + resource);
                }
            } else {
                resource = EjbContainerUtil.TIMER_RESOURCE_JNDI;
View Full Code Here

        }
        return resource;
    }

    private EjbTimerService getEjbTimerService(String target) {
        EjbTimerService ejbt = null;
        if (target == null) {
            if (_logger.isLoggable(Level.FINE)) {
                _logger.fine("Looking for current instance ejb-container config");
            }
            ejbt = getEjbContainer().getEjbTimerService();
View Full Code Here

        try {
           
            // Check for property settings from domain.xml
            EjbContainer ejbc = ejbContainerUtil.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;
                }

                // If the system property com.sun.ejb.timer.ReadDBBeforeTimeout
                // is defined by the user use that the value of the flag
                // performDBReadBeforeTimeout
                foundSysPropDBReadBeforeTimeout =
                    getDBReadBeforeTimeoutProperty();

                // The default value for ReadDBBeforeTimeout in case of PE
                // is false. For SE/EE the correct default would set when the
                // EJBLifecyleImpl gets created as part of the EE lifecycle module
                setPerformDBReadBeforeTimeout( false );

                operationOnConnectionFailure = ejbt.getPropertyValue(ON_CONECTION_FAILURE);
                rescheduleFailedTimer = Boolean.valueOf(ejbt.getPropertyValue(RESCHEDULE_FAILED_TIMER));

                // Load confing listener
                ejbContainerUtil.getDefaultHabitat().getComponent(EJBTimerServiceConfigListener.class);
            }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.EjbTimerService

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.