Examples of PassivationConfig


Examples of org.jboss.metadata.web.jboss.PassivationConfig

    *
    * @param metaData
    */
   private void addPassivationConfigDefaults(JBossWebMetaData metaData)
   {
      PassivationConfig passCfg = metaData.getPassivationConfig();
      if (passCfg == null)
      {
         passCfg = new PassivationConfig();
         metaData.setPassivationConfig(passCfg);
      }
     
      if (passCfg.getUseSessionPassivation() == null)
         passCfg.setUseSessionPassivation(Boolean.valueOf(this.useSessionPassivation));
      if (passCfg.getPassivationMinIdleTime() == null)
         passCfg.setPassivationMinIdleTime(new Integer(this.passivationMinIdleTime));
      if (passCfg.getPassivationMinIdleTime() == null)
         passCfg.setPassivationMaxIdleTime(new Integer(this.passivationMaxIdleTime));
   }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.PassivationConfig

      if (webMetaData.getMaxActiveSessions() != null)
      {
         maxActiveAllowed_ = webMetaData.getMaxActiveSessions().intValue();
      }
     
      PassivationConfig pConfig = webMetaData.getPassivationConfig();
      if (pConfig != null)
      {
         if (pConfig.getUseSessionPassivation() != null)
         {
            setUseSessionPassivation(pConfig.getUseSessionPassivation().booleanValue());
            if (getUseSessionPassivation())
            {
               Integer min = pConfig.getPassivationMinIdleTime();
               if (min != null)
                  setPassivationMinIdleTime(min.intValue());
               Integer max = pConfig.getPassivationMaxIdleTime();
               if (max != null)
                  setPassivationMaxIdleTime(max.intValue());
            }
         }
      }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.PassivationConfig

                                              Boolean useJK)
   {
      JBossWebMetaData webMetaData = new JBossWebMetaData();
      webMetaData.setDistributable(new EmptyMetaData());
      webMetaData.setMaxActiveSessions(maxSessions);
      PassivationConfig pcfg = new PassivationConfig();
      pcfg.setUseSessionPassivation(passivation);
      pcfg.setPassivationMaxIdleTime(maxIdle);
      pcfg.setPassivationMinIdleTime(minIdle);
      webMetaData.setPassivationConfig(pcfg);
      ReplicationConfig repCfg = new ReplicationConfig();
      repCfg.setReplicationGranularity(ReplicationGranularity.SESSION);
      repCfg.setReplicationTrigger(ReplicationTrigger.SET_AND_NON_PRIMITIVE_GET);
      repCfg.setUseJK(useJK);
View Full Code Here

Examples of org.jboss.metadata.web.jboss.PassivationConfig

                                              int maxUnreplicated)
   {
      JBossWebMetaData webMetaData = new JBossWebMetaData();
      webMetaData.setDistributable(new EmptyMetaData());
      webMetaData.setMaxActiveSessions(new Integer(maxSessions));
      PassivationConfig pcfg = new PassivationConfig();
      pcfg.setUseSessionPassivation(Boolean.valueOf(passivation));
      pcfg.setPassivationMaxIdleTime(new Integer(maxIdle));
      pcfg.setPassivationMinIdleTime(new Integer(minIdle));
      webMetaData.setPassivationConfig(pcfg);
      ReplicationConfig repCfg = new ReplicationConfig();
      repCfg.setReplicationGranularity(granularity);
      repCfg.setReplicationTrigger(trigger);
      repCfg.setReplicationFieldBatchMode(Boolean.valueOf(batchMode));
View Full Code Here

Examples of org.jboss.metadata.web.jboss.PassivationConfig

    public static JBossWebMetaData createWebMetaData(ReplicationGranularity granularity, ReplicationTrigger trigger, int maxSessions, boolean passivation, int maxIdle, int minIdle, boolean batchMode, int maxUnreplicated) {
        JBossWebMetaData webMetaData = new JBossWebMetaData();
        webMetaData.setDistributable(new EmptyMetaData());
        webMetaData.setMaxActiveSessions(new Integer(maxSessions));
        PassivationConfig pcfg = new PassivationConfig();
        pcfg.setUseSessionPassivation(Boolean.valueOf(passivation));
        pcfg.setPassivationMaxIdleTime(new Integer(maxIdle));
        pcfg.setPassivationMinIdleTime(new Integer(minIdle));
        webMetaData.setPassivationConfig(pcfg);
        ReplicationConfig repCfg = new ReplicationConfig();
        repCfg.setReplicationGranularity(granularity);
        repCfg.setReplicationTrigger(trigger);
        repCfg.setReplicationFieldBatchMode(Boolean.valueOf(batchMode));
View Full Code Here

Examples of org.jboss.metadata.web.jboss.PassivationConfig

    private JBossWebMetaData createWebMetaData(Integer maxSessions, Boolean passivation, Integer maxIdle, Integer minIdle, Boolean useJK) {
        JBossWebMetaData webMetaData = new JBossWebMetaData();
        webMetaData.setDistributable(new EmptyMetaData());
        webMetaData.setMaxActiveSessions(maxSessions);
        PassivationConfig pcfg = new PassivationConfig();
        pcfg.setUseSessionPassivation(passivation);
        pcfg.setPassivationMaxIdleTime(maxIdle);
        pcfg.setPassivationMinIdleTime(minIdle);
        webMetaData.setPassivationConfig(pcfg);
        ReplicationConfig repCfg = new ReplicationConfig();
        repCfg.setReplicationGranularity(ReplicationGranularity.SESSION);
        repCfg.setReplicationTrigger(ReplicationTrigger.SET_AND_NON_PRIMITIVE_GET);
        repCfg.setUseJK(useJK);
View Full Code Here

Examples of org.jboss.metadata.web.jboss.PassivationConfig

    private final ConcurrentMap<String, ClusteredSession<O>> embryonicSessions = new ConcurrentHashMap<String, ClusteredSession<O>>();

    public DistributableSessionManager(DistributedCacheManagerFactory factory, Context context, JBossWebMetaData metaData, ClassResolver resolver) throws ClusteringNotSupportedException {
        super(metaData);

        PassivationConfig passivationConfig = metaData.getPassivationConfig();
        Boolean useSessionPassivation = (passivationConfig != null) ? passivationConfig.getUseSessionPassivation() : null;
        this.passivate = (useSessionPassivation != null) ? useSessionPassivation.booleanValue() : false;
        Integer minIdleTime = (passivationConfig != null) ? passivationConfig.getPassivationMinIdleTime() : null;
        this.passivationMinIdleTime = (minIdleTime != null) && this.passivate ? minIdleTime.intValue() : -1;
        Integer maxIdleTime = (passivationConfig != null) ? passivationConfig.getPassivationMaxIdleTime() : null;
        this.passivationMaxIdleTime = (maxIdleTime != null) && this.passivate ? maxIdleTime.intValue() : -1;

        ReplicationConfig config = metaData.getReplicationConfig();
        this.replicationConfig = (config != null) ? config : new ReplicationConfig();
View Full Code Here

Examples of org.jboss.metadata.web.jboss.PassivationConfig

      if (webMetaData.getMaxActiveSessions() != null)
      {
         maxActiveAllowed_ = webMetaData.getMaxActiveSessions().intValue();
      }
     
      PassivationConfig pConfig = webMetaData.getPassivationConfig();
      if (pConfig != null)
      {
         if (pConfig.getUseSessionPassivation() != null)
         {
            passivationMode_ = pConfig.getUseSessionPassivation().booleanValue();
            if (passivationMode_)
            {
               Integer min = pConfig.getPassivationMinIdleTime();
               if (min != null)
                  passivationMinIdleTime_ = min.intValue();
               Integer max = pConfig.getPassivationMaxIdleTime();
               if (max != null)
                  passivationMaxIdleTime_ = max.intValue();
            }
         }
      }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.PassivationConfig

    *
    * @param metaData
    */
   private void addPassivationConfigDefaults(JBossWebMetaData metaData)
   {
      PassivationConfig passCfg = metaData.getPassivationConfig();
      if (passCfg == null)
      {
         passCfg = new PassivationConfig();
         metaData.setPassivationConfig(passCfg);
      }
     
      if (passCfg.getUseSessionPassivation() == null)
         passCfg.setUseSessionPassivation(Boolean.valueOf(this.useSessionPassivation));
      if (passCfg.getPassivationMinIdleTime() == null)
         passCfg.setPassivationMinIdleTime(new Integer(this.passivationMinIdleTime));
      if (passCfg.getPassivationMinIdleTime() == null)
         passCfg.setPassivationMaxIdleTime(new Integer(this.passivationMaxIdleTime));
   }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.PassivationConfig

        if (factory == null) {
            throw new ClusteringNotSupportedException("No DistributedCacheManagerFactory service provider found.");
        }

        PassivationConfig passivationConfig = metaData.getPassivationConfig();
        Boolean useSessionPassivation = (passivationConfig != null) ? passivationConfig.getUseSessionPassivation() : null;
        this.passivate = (useSessionPassivation != null) ? useSessionPassivation.booleanValue() : false;
        Integer minIdleTime = (passivationConfig != null) ? passivationConfig.getPassivationMinIdleTime() : null;
        this.passivationMinIdleTime = (minIdleTime != null) && this.passivate ? minIdleTime.intValue() : -1;
        Integer maxIdleTime = (passivationConfig != null) ? passivationConfig.getPassivationMaxIdleTime() : null;
        this.passivationMaxIdleTime = (maxIdleTime != null) && this.passivate ? maxIdleTime.intValue() : -1;

        ReplicationConfig config = metaData.getReplicationConfig();
        this.replicationConfig = (config != null) ? config : new ReplicationConfig();
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.