Package org.jboss.as.clustering.web

Examples of org.jboss.as.clustering.web.DistributedCacheManagerFactory


                builder.addDependencies(action.dependencies());
            }

            if (metaData.getDistributable() != null) {
                DistributedCacheManagerFactoryService factoryService = new DistributedCacheManagerFactoryService();
                DistributedCacheManagerFactory factory = factoryService.getValue();
                if (factory != null) {
                    ServiceName factoryServiceName = deploymentServiceName.append("session");
                    builder.addDependency(DependencyType.OPTIONAL, factoryServiceName, DistributedCacheManagerFactory.class, config.getDistributedCacheManagerFactoryInjector());

                    ServiceBuilder<DistributedCacheManagerFactory> factoryBuilder = serviceTarget.addService(factoryServiceName, factoryService);
                    boolean enabled = factory.addDependencies(deploymentUnit.getServiceRegistry(), serviceTarget, factoryBuilder, metaData);
                    factoryBuilder.setInitialMode(enabled ? ServiceController.Mode.ON_DEMAND : ServiceController.Mode.NEVER).install();
                }
            }

            builder.install();
View Full Code Here


            for(final SetupAction action : setupActions) {
                builder.addDependencies(action.dependencies());
            }

            if (metaData.getDistributable() != null) {
                final DistributedCacheManagerFactory factory = DistributableSessionManager.getDistributedCacheManagerFactory();
                if (factory != null) {
                    builder.addDependencies(DependencyType.OPTIONAL, factory.getDependencies(metaData));
                }
            }

            builder.install();
View Full Code Here

                    webDeploymentService.getRealm());

            builder.addDependencies(deploymentUnit.getAttachmentList(Attachments.WEB_DEPENDENCIES));
            builder.addDependency(JndiNamingDependencyProcessor.serviceName(deploymentUnit));
            if (metaData.getDistributable() != null) {
                DistributedCacheManagerFactory factory = DistributableSessionManager.getDistributedCacheManagerFactory();
                if (factory != null) {
                    builder.addDependencies(factory.getDependencies(metaData));
                }
            }
            builder.install();
        } catch (ServiceRegistryException e) {
            throw new DeploymentUnitProcessingException("Failed to add JBoss web deployment service", e);
View Full Code Here

                builder.addDependencies(action.dependencies());
            }

            if (metaData.getDistributable() != null) {
                DistributedCacheManagerFactoryService factoryService = new DistributedCacheManagerFactoryService();
                DistributedCacheManagerFactory factory = factoryService.getValue();
                if (factory != null) {
                    ServiceName factoryServiceName = deploymentServiceName.append("session");
                    builder.addDependency(DependencyType.OPTIONAL, factoryServiceName, DistributedCacheManagerFactory.class, config.getDistributedCacheManagerFactoryInjector());

                    ServiceBuilder<DistributedCacheManagerFactory> factoryBuilder = serviceTarget.addService(factoryServiceName, factoryService);
                    boolean enabled = factory.addDeploymentDependencies(deploymentServiceName, deploymentUnit.getServiceRegistry(), serviceTarget, factoryBuilder, metaData);
                    factoryBuilder.setInitialMode(enabled ? ServiceController.Mode.ON_DEMAND : ServiceController.Mode.NEVER).install();
                }
            }

            builder.install();
View Full Code Here

                .addDependency(PathManagerService.SERVICE_NAME, PathManager.class, service.getPathManagerInjector())
                .addDependency(DependencyType.OPTIONAL, ServiceName.JBOSS.append("mbean", "server"), MBeanServer.class, service.getMbeanServer())
                .setInitialMode(Mode.ON_DEMAND)
                .install());

        final DistributedCacheManagerFactory factory = new DistributedCacheManagerFactoryService().getValue();
        if (factory != null) {
            final InjectedValue<WebServer> server = new InjectedValue<WebServer>();
            newControllers.add(target.addService(DistributedCacheManagerFactoryService.JVM_ROUTE_REGISTRY_ENTRY_PROVIDER_SERVICE_NAME, new JvmRouteRegistryEntryProviderService(server))
                    .addDependency(WebSubsystemServices.JBOSS_WEB, WebServer.class, server)
                    .setInitialMode(Mode.ON_DEMAND)
                    .install());
            newControllers.addAll(factory.installServices(target));
        }
    }
View Full Code Here

                builder.addDependencies(action.dependencies());
            }

            if (metaData.getDistributable() != null) {
                DistributedCacheManagerFactoryService factoryService = new DistributedCacheManagerFactoryService();
                DistributedCacheManagerFactory factory = factoryService.getValue();
                if (factory != null) {
                    ServiceName factoryServiceName = deploymentServiceName.append("session");
                    builder.addDependency(DependencyType.OPTIONAL, factoryServiceName, DistributedCacheManagerFactory.class, config.getDistributedCacheManagerFactoryInjector());

                    ServiceBuilder<DistributedCacheManagerFactory> factoryBuilder = serviceTarget.addService(factoryServiceName, factoryService);
                    boolean enabled = factory.addDependencies(serviceTarget, factoryBuilder, metaData);
                    factoryBuilder.setInitialMode(enabled ? ServiceController.Mode.ON_DEMAND : ServiceController.Mode.NEVER).install();
                }
            }

            builder.install();
View Full Code Here

                    .addDependency(realmServiceName, Realm.class, webDeploymentService.getRealm())
                    .addDependencies(deploymentUnit.getAttachmentList(Attachments.WEB_DEPENDENCIES))
                    .addDependency(JndiNamingDependencyProcessor.serviceName(deploymentUnit));

            if (metaData.getDistributable() != null) {
                final DistributedCacheManagerFactory factory = DistributableSessionManager.getDistributedCacheManagerFactory();
                if (factory != null) {
                    builder.addDependencies(DependencyType.OPTIONAL, factory.getDependencies(metaData));
                }
            }

            builder.install();
View Full Code Here

                builder.addDependencies(action.dependencies());
            }

            if (metaData.getDistributable() != null) {
                DistributedCacheManagerFactoryService factoryService = new DistributedCacheManagerFactoryService();
                DistributedCacheManagerFactory factory = factoryService.getValue();
                if (factory != null) {
                    ServiceName factoryServiceName = deploymentServiceName.append("session");
                    builder.addDependency(DependencyType.OPTIONAL, factoryServiceName, DistributedCacheManagerFactory.class, config.getDistributedCacheManagerFactoryInjector());

                    ServiceBuilder<DistributedCacheManagerFactory> factoryBuilder = serviceTarget.addService(factoryServiceName, factoryService);
                    boolean enabled = factory.addDeploymentDependencies(deploymentServiceName, deploymentUnit.getServiceRegistry(), serviceTarget, factoryBuilder, metaData);
                    factoryBuilder.setInitialMode(enabled ? ServiceController.Mode.ON_DEMAND : ServiceController.Mode.NEVER).install();
                }
            }

            builder.install();
View Full Code Here

                webappBuilder.addDependencies(action.dependencies());
            }

            if (metaData.getDistributable() != null) {
                DistributedCacheManagerFactoryService factoryService = new DistributedCacheManagerFactoryService();
                DistributedCacheManagerFactory factory = factoryService.getValue();
                if (factory != null) {
                    ServiceName factoryServiceName = webappServiceName.append("session");
                    webappBuilder.addDependency(DependencyType.OPTIONAL, factoryServiceName, DistributedCacheManagerFactory.class, config.getDistributedCacheManagerFactoryInjector());

                    ServiceBuilder<DistributedCacheManagerFactory> factoryBuilder = serviceTarget.addService(factoryServiceName, factoryService);
                    boolean enabled = factory.addDeploymentDependencies(webappServiceName, deploymentUnit.getServiceRegistry(), serviceTarget, factoryBuilder, metaData);
                    factoryBuilder.setInitialMode(enabled ? Mode.ON_DEMAND : Mode.NEVER).install();
                }
            }

            // OSGi web applications are activated in {@link WebContextActivationProcessor} according to bundle lifecycle changes
View Full Code Here

                .addDependency(PathManagerService.SERVICE_NAME, PathManager.class, service.getPathManagerInjector())
                .addDependency(DependencyType.OPTIONAL, ServiceName.JBOSS.append("mbean", "server"), MBeanServer.class, service.getMbeanServer())
                .setInitialMode(Mode.ON_DEMAND)
                .install());

        final DistributedCacheManagerFactory factory = new DistributedCacheManagerFactoryService().getValue();
        if (factory != null) {
            final InjectedValue<WebServer> server = new InjectedValue<WebServer>();
            newControllers.add(target.addService(DistributedCacheManagerFactoryService.JVM_ROUTE_REGISTRY_ENTRY_PROVIDER_SERVICE_NAME, new JvmRouteRegistryEntryProviderService(server))
                    .addDependency(WebSubsystemServices.JBOSS_WEB, WebServer.class, server)
                    .setInitialMode(Mode.ON_DEMAND)
                    .install());
            newControllers.addAll(factory.installServices(target));
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.clustering.web.DistributedCacheManagerFactory

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.