Package com.sun.enterprise.web.session

Examples of com.sun.enterprise.web.session.PersistenceType


   
    //this could be ha, replicated
    //or a registered replication implementation
    private static boolean isPersistenceTypeHAOrReplicated() {   
        ServerConfigLookup lookup = new ServerConfigLookup();
        PersistenceType persistenceType =
                lookup.getPersistenceTypeFromConfig();
        String persistenceTypeString = persistenceType.getType();
        return persistenceTypeString.equalsIgnoreCase("HA")
            || persistenceTypeString.equalsIgnoreCase("Replicated")
            || isPersistenceTypeRegistered();
    }
View Full Code Here


            || isPersistenceTypeRegistered();
    }
   
    private static boolean isPersistenceTypeRegistered() {         
        ServerConfigLookup lookup = new ServerConfigLookup();
        PersistenceType persistenceType =
                lookup.getPersistenceTypeFromConfig();
        String persistenceTypeString = persistenceType.getType();
        EEPersistenceTypeResolver resolver = new EEPersistenceTypeResolver();
        return resolver.isRegisteredType(persistenceTypeString);
    }   
View Full Code Here

        return resolver.isRegisteredType(persistenceTypeString);
    }   
   
    private boolean isPersistenceTypeHA() {   
        ServerConfigLookup lookup = new ServerConfigLookup();
        PersistenceType persistenceType =
                lookup.getPersistenceTypeFromConfig();
        String persistenceTypeString = persistenceType.getType();
        return persistenceTypeString.equalsIgnoreCase("HA");
    }
View Full Code Here

        return persistenceTypeString.equalsIgnoreCase("HA");
    }
   
    private boolean isPersistenceTypeReplicated() {   
        ServerConfigLookup lookup = new ServerConfigLookup();
        PersistenceType persistenceType =
                lookup.getPersistenceTypeFromConfig();
        String persistenceTypeString = persistenceType.getType();
        return persistenceTypeString.equalsIgnoreCase("REPLICATED");
    }
View Full Code Here

        return persistenceTypeString.equalsIgnoreCase("REPLICATED");
    }
   
    private String getPassedInPersistenceType() {   
        ServerConfigLookup lookup = new ServerConfigLookup();
        PersistenceType persistenceType =
                lookup.getPersistenceTypeFromConfig();
        //return persistenceType.getType();
        String passedInPersistenceTypeString = persistenceType.getType();
        /*
        PersistenceTypeResolver persistenceTypeResolver
            = getPersistenceTypeResolver();
        String resolvedPersistenceType
            = persistenceTypeResolver.resolvePersistenceType(passedInPersistenceTypeString);
View Full Code Here

    public PersistenceType getPersistenceTypeFromConfig() {
        if(_logger.isLoggable(Level.FINEST)) {
            _logger.finest("in ServerConfigLookup>>getPersistenceTypeFromConfig");
        }
        String persistenceTypeString = null;     
        PersistenceType persistenceType = null;

        WebContainerAvailability webContainerAvailabilityBean =
        this.getWebContainerAvailability();
        if(webContainerAvailabilityBean == null) {
            return null;
        }
        persistenceTypeString = webContainerAvailabilityBean.getPersistenceType();

        if(persistenceTypeString != null) {
            persistenceType = PersistenceType.parseType(persistenceTypeString);
        }
        if(persistenceType != null) {
            if(_logger.isLoggable(Level.FINEST)) {
                _logger.finest("SERVER.XML persistenceType= " + persistenceType.getType());
            }
        } else {
            if(_logger.isLoggable(Level.FINEST)) {
                _logger.finest("SERVER.XML persistenceType missing");
            }
View Full Code Here

     */
    protected void configureSessionManager(SessionManager smBean,
                                           WebBundleDescriptor wbd,
                                           WebModuleConfig wmInfo) {
       
        PersistenceType persistence = PersistenceType.MEMORY;
        String frequency = null;
        String scope = null;
       
        SessionManagerConfigurationHelper configHelper =
            new SessionManagerConfigurationHelper(this, smBean, wbd, wmInfo);
       
        persistence = configHelper.getPersistenceType();
        frequency = configHelper.getPersistenceFrequency();
        scope = configHelper.getPersistenceScope();

        if (logger.isLoggable(Level.FINEST)) {       
            logger.finest("IN WebContainer>>ConfigureSessionManager before builder factory");
            logger.finest("FINAL_PERSISTENCE-TYPE IS = "
                          + persistence.getType());
            logger.finest("FINAL_PERSISTENCE_FREQUENCY IS = " + frequency);
            logger.finest("FINAL_PERSISTENCE_SCOPE IS = " + scope);         
        }

  PersistenceStrategyBuilderFactory factory =
            new PersistenceStrategyBuilderFactory();
        PersistenceStrategyBuilder builder =
            factory.createPersistenceStrategyBuilder(persistence.getType(),
                                                     frequency, scope, this);
        if (logger.isLoggable(Level.FINEST)) {
            logger.finest("PersistenceStrategyBuilder class = "
                          + builder.getClass().getName());
        }
View Full Code Here

                httpSmBean, sipSmBean, wbd, wmInfo);

        /*
         * Configure HTTP session manager
         */
        PersistenceType httpType = configHelper.getPersistenceType();
        String httpFrequency = configHelper.getPersistenceFrequency();
        String httpScope = configHelper.getPersistenceScope();

        PersistenceStrategyBuilderFactory httpFactory =
            new PersistenceStrategyBuilderFactory();
        PersistenceStrategyBuilder httpBuilder =
            httpFactory.createPersistenceStrategyBuilder(httpType.getType(),
                httpFrequency, httpScope, this);
        httpBuilder.setLogger(Logger.getLogger(LogUtil.SIP_LOG_DOMAIN));
        httpBuilder.setIsConverged(true);
        httpBuilder.initializePersistenceStrategy(this, httpSmBean);

        /*
         * Configure SIP session manager
         */
        PersistenceType sipType = configHelper.getSipPersistenceType();
        String sipFrequency = configHelper.getSipPersistenceFrequency();
        String sipScope = configHelper.getSipPersistenceScope();

        logger.log(Level.INFO, "Application " + getName() +
            " configured with SIP persistence type: " + sipType.getType() +
            ", frequency: " + sipFrequency + ", and scope: " + sipScope);

        SipPersistenceStrategyBuilderFactory sipFactory =
            new SipPersistenceStrategyBuilderFactory();
        SipPersistenceStrategyBuilder sipBuilder =
            sipFactory.createPersistenceStrategyBuilder(sipType.getType(),
                sipFrequency, sipScope, this);
        sipBuilder.setLogger(Logger.getLogger(LogUtil.SIP_LOG_DOMAIN));
        sipBuilder.initializePersistenceStrategy(this, sipSmBean,
            configHelper.getSipContainerAvailability());
    }
View Full Code Here

            return null;
        }

        String persistenceTypeString = sca.getPersistenceType();

        PersistenceType persistenceType = null;

        if (persistenceTypeString != null) {
            persistenceType = PersistenceType.parseType(persistenceTypeString);
        }
View Full Code Here

                super.initializeConfiguration();
            }
        }

        // Determine persistence configuration for SIP
        PersistenceType persistenceType = PersistenceType.MEMORY;
        String persistenceFrequency = null;
        String persistenceScope = null;

        boolean isAvailabilityEnabled = lookup.calculateSipAvailabilityEnabledFromConfig(_ctx);

        if (isAvailabilityEnabled) {
            // These are the global defaults if nothing is set at
            // domain.xml or sun-sip.xml
            persistenceType = PersistenceType.REPLICATED;
            persistenceFrequency = "sip-transaction";
            persistenceScope = "session";
        }

        // If domain.xml default exists, then use that
        PersistenceType domainPersistenceType = lookup.getSipPersistenceTypeFromConfig();

        if (domainPersistenceType != null) {
            persistenceType = domainPersistenceType;
            persistenceFrequency = lookup.getSipPersistenceFrequencyFromConfig();
            persistenceScope = lookup.getSipPersistenceScopeFromConfig();
View Full Code Here

TOP

Related Classes of com.sun.enterprise.web.session.PersistenceType

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.