Examples of ReplicationConfig


Examples of org.jboss.metadata.web.jboss.ReplicationConfig

        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));
        repCfg.setMaxUnreplicatedInterval(Integer.valueOf(maxUnreplicated));
        repCfg.setSnapshotMode(SnapshotMode.INSTANT);
        webMetaData.setReplicationConfig(repCfg);

        return webMetaData;
    }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

        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);
        webMetaData.setReplicationConfig(repCfg);
        return webMetaData;
    }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

        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();

        if (this.replicationConfig.getReplicationGranularity() == ReplicationGranularity.FIELD) {
            this.replicationConfig.setReplicationGranularity(ReplicationGranularity.SESSION);
        }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

    *
    * @param metaData
    */
   private void addReplicationConfigDefaults(JBossWebMetaData metaData)
   {
      ReplicationConfig repCfg = metaData.getReplicationConfig();
      if (repCfg == null)
      {
         repCfg = new ReplicationConfig();
         metaData.setReplicationConfig(repCfg);
      }
     
      if (repCfg.getUseJK() == null && useJK != null)
         repCfg.setUseJK(this.useJK);
      if (repCfg.getSnapshotMode() == null)
         repCfg.setSnapshotMode(this.snapshotMode);
      if (repCfg.getSnapshotInterval() == null)
         repCfg.setSnapshotInterval(new Integer(this.snapshotInterval));
      if (repCfg.getReplicationGranularity() == null)
         repCfg.setReplicationGranularity(this.replicationGranularity);
      if (repCfg.getReplicationTrigger() == null)
         repCfg.setReplicationTrigger(this.replicationTrigger);
      if (repCfg.getReplicationFieldBatchMode() == null)
         repCfg.setReplicationFieldBatchMode(Boolean.valueOf(this.replicationFieldBatchMode));

      if (repCfg.getCacheName() == null)
      {
         String cacheConfig = ReplicationGranularity.FIELD == repCfg.getReplicationGranularity()
                                                           ? fieldGranularityCacheName : cacheName;
         repCfg.setCacheName(cacheConfig);
      }
     
      if (repCfg.getMaxUnreplicatedInterval() == null)
      {
         repCfg.setMaxUnreplicatedInterval(new Integer(maxUnreplicatedInterval));
      }
   }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

      registerManagerMBean();
   }
  
   private void synthesizeReplicationConfig()
   {
      ReplicationConfig cfg = new ReplicationConfig();
      cfg.setReplicationGranularity(replicationGranularity_);
      cfg.setReplicationTrigger(replicationTrigger_);
      cfg.setUseJK(useJK_);
      cfg.setCacheName(cacheConfigName_);
      cfg.setSnapshotMode(snapshotMode_);
      cfg.setSnapshotInterval(Integer.valueOf(snapshotInterval_));
      cfg.setMaxUnreplicatedInterval(Integer.valueOf(maxUnreplicatedInterval_));
      cfg.setSessionNotificationPolicy(notificationPolicyClass_);     
      this.replicationConfig_ = cfg;
   }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

        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();

        if (this.replicationConfig.getReplicationGranularity() == ReplicationGranularity.FIELD) {
            throw new IllegalArgumentException("FIELD replication-granularity is no longer supported");
        }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

        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();

        if (this.replicationConfig.getReplicationGranularity() == ReplicationGranularity.FIELD) {
            throw new IllegalArgumentException("FIELD replication-granularity is no longer supported");
        }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

   public void testClustering() throws Exception
   {
      //enableTrace("org.jboss.xb.builder");
      JBossWebMetaData jbossWeb = unmarshal();
     
      ReplicationConfig replConfig = jbossWeb.getReplicationConfig();
      assertNotNull(replConfig);
      assertEquals("testCache", replConfig.getCacheName());
      assertEquals(ReplicationTrigger.SET, replConfig.getReplicationTrigger());
      assertEquals(ReplicationGranularity.FIELD, replConfig.getReplicationGranularity());
      assertNotNull(replConfig.getReplicationFieldBatchMode());
      assertTrue(replConfig.getReplicationFieldBatchMode().booleanValue());
      assertNotNull(replConfig.getUseJK());
      assertTrue(replConfig.getUseJK().booleanValue());
      assertNotNull(replConfig.getMaxUnreplicatedInterval());
      assertEquals(30, replConfig.getMaxUnreplicatedInterval().intValue());
      assertEquals(SnapshotMode.INTERVAL, replConfig.getSnapshotMode());
      assertNotNull(replConfig.getSnapshotInterval());
      assertEquals(5, replConfig.getSnapshotInterval().intValue());
      assertEquals("org.jboss.test.TestNotificationPolicy", replConfig.getSessionNotificationPolicy());
     
      assertNotNull(jbossWeb.getMaxActiveSessions());
      assertEquals(20, jbossWeb.getMaxActiveSessions().intValue());
     
      PassivationConfig passConfig = jbossWeb.getPassivationConfig();
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

*/
public class Util
{
   public static ReplicationGranularity getReplicationGranularity(LocalDistributableSessionManager localManager)
   {
      ReplicationConfig config = localManager.getReplicationConfig();
      return config.getReplicationGranularity();
  
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

      return config.getReplicationGranularity();
  
  
   public static String getCacheConfigName(LocalDistributableSessionManager localManager)
   {
      ReplicationConfig config = localManager.getReplicationConfig();
      return config.getCacheName();
   }
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.