private static CapabilityServiceConfigurator getSessionIdentifierCodecServiceConfigurator(ServiceName deploymentServiceName, String serverName, String deploymentName, JBossWebMetaData metaData) { ServiceName name = deploymentServiceName.append("codec"); if (metaData.getDistributable() != null) { if (DistributableSessionIdentifierCodecServiceConfiguratorProvider.INSTANCE.isPresent()) { return DistributableSessionIdentifierCodecServiceConfiguratorProvider.INSTANCE.get().getDeploymentServiceConfigurator(name, serverName, deploymentName); } // Fallback to simple codec if server does not support clustering } return new SimpleSessionIdentifierCodecServiceConfigurator(name, serverName); }
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 getSessionIdentifierCodecServiceConfigurator(ServiceName deploymentServiceName, String serverName, String deploymentName, JBossWebMetaData metaData) { ServiceName name = deploymentServiceName.append("codec"); if (metaData.getDistributable() != null) { if (DistributableSessionIdentifierCodecServiceConfiguratorProvider.INSTANCE.isPresent()) { return DistributableSessionIdentifierCodecServiceConfiguratorProvider.INSTANCE.get().getDeploymentServiceConfigurator(name, serverName, deploymentName); } // Fallback to simple codec if server does not support clustering } return new SimpleSessionIdentifierCodecServiceConfigurator(name, serverName); }
private static CapabilityServiceConfigurator getSessionIdentifierCodecServiceConfigurator(ServiceName deploymentServiceName, String serverName, String deploymentName, JBossWebMetaData metaData) { ServiceName name = deploymentServiceName.append("codec"); if (metaData.getDistributable() != null) { if (DistributableSessionIdentifierCodecServiceConfiguratorProvider.INSTANCE.isPresent()) { return DistributableSessionIdentifierCodecServiceConfiguratorProvider.INSTANCE.get().getDeploymentServiceConfigurator(name, serverName, deploymentName); } // Fallback to simple codec if server does not support clustering } return new SimpleSessionIdentifierCodecServiceConfigurator(name, serverName); }
public void deploy(DeploymentUnit unit) throws DeploymentException { JBossWebMetaData metaData = unit.getAttachment(JBossWebMetaData.class); if( metaData != null && metaData.getDistributable() != null ) { if (clusterCacheDependency != null) { log.debug("Adding dependency on " + clusterCacheDependency + " to " + unit.getName()); List<String> depends = metaData.getDepends(); if (depends == null) depends = new ArrayList<String>(); if (!depends.contains(clusterCacheDependency)) { depends.add(clusterCacheDependency); } metaData.setDepends(depends); } else { log.warn("clusterCacheDependency is null; either configure it or remove this deployer"); } } }
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; }
String defaultManagerClass = webMetaData.getDistributable() == null ? StandardManager.class.getName() : JBossCacheManager.class.getName(); Manager manager = (Manager)TomcatService.getInstance(managerMetaData, defaultManagerClass);
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()); }
if(override != null && override.getDistributable()!= null) setDistributable(override.getDistributable()); else if(original != null && original.getDistributable() != null) setDistributable(original.getDistributable());
dest.setServletVersion(original.getVersion()); if (override != null && override.getDistributable() != null) dest.setDistributable(override.getDistributable()); else if (original != null && original.getDistributable() != null) dest.setDistributable(original.getDistributable());
if (metaData.getDistributable() != null) context.setDistributable(true);