public SimpleDistributableSessionManagerConfiguration(JBossWebMetaData metaData, String serverName, String deploymentName, Module module) { this(metaData.getMaxActiveSessions(), metaData.getReplicationConfig(), serverName, deploymentName, module); }
private static CapabilityServiceConfigurator getSessionManagerFactoryServiceConfigurator(ServiceName deploymentServiceName, String serverName, String deploymentName, Module module, JBossWebMetaData metaData, ServletContainerService servletContainerService) { Integer maxActiveSessions = metaData.getMaxActiveSessions(); if(maxActiveSessions == null && servletContainerService != null) { maxActiveSessions = servletContainerService.getMaxSessions(); } ServiceName name = deploymentServiceName.append("session"); if (metaData.getDistributable() != null) { if (DistributableSessionManagerFactoryServiceConfiguratorProvider.INSTANCE.isPresent()) { DistributableSessionManagerConfiguration config = new SimpleDistributableSessionManagerConfiguration(maxActiveSessions, metaData.getReplicationConfig(), serverName, deploymentName, module); return DistributableSessionManagerFactoryServiceConfiguratorProvider.INSTANCE.get().getServiceConfigurator(name, config); } // Fallback to local session manager if server does not support clustering UndertowLogger.ROOT_LOGGER.clusteringNotSupported(); } return new SimpleCapabilityServiceConfigurator<>(name, (maxActiveSessions != null) ? new InMemorySessionManagerFactory(maxActiveSessions) : new InMemorySessionManagerFactory()); }
@XmlElement(name="replication-config", type=ReplicationConfig60.class) @Override public ReplicationConfig getReplicationConfig() { return super.getReplicationConfig(); }
public SimpleDistributableSessionManagerConfiguration(JBossWebMetaData metaData, String serverName, String deploymentName, Module module) { this(metaData.getMaxActiveSessions(), metaData.getReplicationConfig(), serverName, deploymentName, module); }
public SimpleDistributableSessionManagerConfiguration(JBossWebMetaData metaData, String serverName, String deploymentName, Module module) { this(metaData.getMaxActiveSessions(), metaData.getReplicationConfig(), serverName, deploymentName, module); }
public static boolean isDistributable(final DeploymentUnit deploymentUnit) { WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY); if (warMetaData == null) { return false; } JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData(); if (webMetaData == null) { return false; } return webMetaData.getDistributable() != null || webMetaData.getReplicationConfig() != null; }
public static boolean isDistributable(final DeploymentUnit deploymentUnit) { WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY); if (warMetaData == null) { return false; } JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData(); if (webMetaData == null) { return false; } return webMetaData.getDistributable() != null || webMetaData.getReplicationConfig() != null; }
private static CapabilityServiceConfigurator getSessionManagerFactoryServiceConfigurator(ServiceName deploymentServiceName, String serverName, String deploymentName, Module module, JBossWebMetaData metaData, ServletContainerService servletContainerService) { Integer maxActiveSessions = metaData.getMaxActiveSessions(); if(maxActiveSessions == null && servletContainerService != null) { maxActiveSessions = servletContainerService.getMaxSessions(); } ServiceName name = deploymentServiceName.append("session"); if (metaData.getDistributable() != null) { if (DistributableSessionManagerFactoryServiceConfiguratorProvider.INSTANCE.isPresent()) { DistributableSessionManagerConfiguration config = new SimpleDistributableSessionManagerConfiguration(maxActiveSessions, metaData.getReplicationConfig(), serverName, deploymentName, module); return DistributableSessionManagerFactoryServiceConfiguratorProvider.INSTANCE.get().getServiceConfigurator(name, config); } // Fallback to local session manager if server does not support clustering UndertowLogger.ROOT_LOGGER.clusteringNotSupported(); } return new SimpleCapabilityServiceConfigurator<>(name, (maxActiveSessions != null) ? new InMemorySessionManagerFactory(maxActiveSessions) : new InMemorySessionManagerFactory()); }
private static CapabilityServiceConfigurator getSessionManagerFactoryServiceConfigurator(ServiceName deploymentServiceName, String serverName, String deploymentName, Module module, JBossWebMetaData metaData, ServletContainerService servletContainerService) { Integer maxActiveSessions = metaData.getMaxActiveSessions(); if(maxActiveSessions == null && servletContainerService != null) { maxActiveSessions = servletContainerService.getMaxSessions(); } ServiceName name = deploymentServiceName.append("session"); if (metaData.getDistributable() != null) { if (DistributableSessionManagerFactoryServiceConfiguratorProvider.INSTANCE.isPresent()) { DistributableSessionManagerConfiguration config = new SimpleDistributableSessionManagerConfiguration(maxActiveSessions, metaData.getReplicationConfig(), serverName, deploymentName, module); return DistributableSessionManagerFactoryServiceConfiguratorProvider.INSTANCE.get().getServiceConfigurator(name, config); } // Fallback to local session manager if server does not support clustering UndertowLogger.ROOT_LOGGER.clusteringNotSupported(); } return new SimpleCapabilityServiceConfigurator<>(name, (maxActiveSessions != null) ? new InMemorySessionManagerFactory(maxActiveSessions) : new InMemorySessionManagerFactory()); }
@Override public boolean addDeploymentDependencies(ServiceName deploymentServiceName, ServiceRegistry registry, ServiceTarget target, ServiceBuilder<?> builder, JBossWebMetaData metaData) { ServiceName templateCacheServiceName = this.getCacheServiceName(metaData.getReplicationConfig()); if (registry.getService(templateCacheServiceName) == null) { return false;
if (webMetaData.getReplicationConfig() != null && webMetaData.getReplicationConfig().getCacheName() != null) { ServiceName sn = ServiceName.parse(webMetaData.getReplicationConfig().getCacheName()); cacheContainer = sn.getParent().getSimpleName(); deploymentSessionCacheName = sn.getSimpleName();
if (webMetaData.getReplicationConfig() != null && webMetaData.getReplicationConfig().getCacheName() != null) { ServiceName sn = ServiceName.parse(webMetaData.getReplicationConfig().getCacheName()); cacheContainer = sn.getParent().getSimpleName(); deploymentSessionCacheName = sn.getSimpleName();
this.replicationConfig_ = webMetaData.getReplicationConfig(); this.replicationTrigger_ = replicationConfig_.getReplicationTrigger(); setReplicationGranularity(replicationConfig_.getReplicationGranularity());
ReplicationConfig repCfg = metaData.getReplicationConfig(); if (repCfg == null)
setUseSessionCookies(override.isUseSessionCookies()); if(override != null && override.getReplicationConfig()!= null) setReplicationConfig(override.getReplicationConfig());
dest.setFlushOnSessionInvalidation(override.isFlushOnSessionInvalidation()); if (override != null && override.getReplicationConfig() != null) dest.setReplicationConfig(override.getReplicationConfig());