Package org.jboss.msc.service

Examples of org.jboss.msc.service.ServiceTarget.addService()


                .addListener(verificationHandler)
                .setInitialMode(ServiceController.Mode.ACTIVE).install());

            // add subject factory service
            final SubjectFactoryService subjectFactoryService = new SubjectFactoryService(SUBJECT_FACTORY);
            newControllers.add(target.addService(SubjectFactoryService.SERVICE_NAME, subjectFactoryService)
                .addDependency(SecurityManagementService.SERVICE_NAME, ISecurityManagement.class,
                        subjectFactoryService.getSecurityManagementInjector())
                .addListener(verificationHandler)
                .setInitialMode(ServiceController.Mode.ACTIVE).install());
View Full Code Here


                .setInitialMode(ServiceController.Mode.ACTIVE).install());

            // add jaas configuration service
            Configuration loginConfig = XMLLoginConfigImpl.getInstance();
            final JaasConfigurationService jaasConfigurationService = new JaasConfigurationService(loginConfig);
            newControllers.add(target.addService(JaasConfigurationService.SERVICE_NAME, jaasConfigurationService)
                .addListener(verificationHandler).setInitialMode(ServiceController.Mode.ACTIVE).install());

            //add Simple Security Manager Service
            final SimpleSecurityManagerService simpleSecurityManagerService = new SimpleSecurityManagerService();
View Full Code Here

                .addListener(verificationHandler).setInitialMode(ServiceController.Mode.ACTIVE).install());

            //add Simple Security Manager Service
            final SimpleSecurityManagerService simpleSecurityManagerService = new SimpleSecurityManagerService();

            newControllers.add(target.addService(SimpleSecurityManagerService.SERVICE_NAME, simpleSecurityManagerService)
                .addDependency(SecurityManagementService.SERVICE_NAME, ISecurityManagement.class,
                            simpleSecurityManagerService.getSecurityManagementInjector())
                .addListener(verificationHandler).install());

            context.addStep(new AbstractDeploymentChainStep() {
View Full Code Here

        final JpaInjectionServices rootJpaInjectionServices = new WeldJpaInjectionServices(deploymentUnit, deploymentUnit.getServiceRegistry());
        weldContainer.addWeldService(JpaInjectionServices.class, rootJpaInjectionServices);

        final WeldService weldService = new WeldService(weldContainer, deploymentUnit.getName());
        // add the weld service
        final ServiceBuilder<WeldContainer> weldServiceBuilder = serviceTarget.addService(weldServiceName, weldService);

        weldServiceBuilder.addDependencies(TCCLSingletonService.SERVICE_NAME);

        installResourceInjectionService(serviceTarget, deploymentUnit, weldService, weldServiceBuilder);
        installSecurityService(serviceTarget, deploymentUnit, weldService, weldServiceBuilder);
View Full Code Here

        }

        // TODO: decide the fate of these

        // Graceful shutdown
        serviceTarget.addService(ShutdownHandler.SERVICE_NAME, new ShutdownHandlerImpl()).install();

        // Add server environment
        ServerEnvironmentService.addService(serverEnvironment, serviceTarget);

        // Add environment paths
View Full Code Here

        StringConfigurationPersister persister = new StringConfigurationPersister(allOps, testParser);
        final ExtensionRegistry controllerExtensionRegistry = cloneExtensionRegistry();
        controllerExtensionRegistry.setWriterRegistry(persister);
        ModelControllerService svc = new ModelControllerService(mainExtension, controllerInitializer, additionalInit, controllerExtensionRegistry,
                processState, persister, additionalInit.isValidateOperations());
        ServiceBuilder<ModelController> builder = target.addService(Services.JBOSS_SERVER_CONTROLLER, svc);
        builder.install();

        additionalInit.addExtraServices(target);

        //sharedState = svc.state;
View Full Code Here

        final ExtensionRegistry extensionRegistry = new ExtensionRegistry(ProcessType.STANDALONE_SERVER, new RunningModeControl(RunningMode.NORMAL));
        final StringConfigurationPersister persister = new StringConfigurationPersister(Collections.<ModelNode>emptyList(), new StandaloneXml(null, null, extensionRegistry));
        extensionRegistry.setWriterRegistry(persister);
        final ControlledProcessState processState = new ControlledProcessState(true);
        final ModelControllerService svc = new ModelControllerService(processState, persister);
        final ServiceBuilder<ModelController> builder = target.addService(Services.JBOSS_SERVER_CONTROLLER, svc);
        builder.install();

        svc.latch.await();
        this.controller = svc.getValue();
View Full Code Here


            final ServiceTarget serviceTarget = context.getServiceTarget();

            final ConnectionDefinitionService service = new ConnectionDefinitionService(connectionDefinitionValue);
            ServiceController<?> controller = serviceTarget.addService(serviceName, service).setInitialMode(ServiceController.Mode.ACTIVE)
                    .addDependency(raServiceName, ModifiableResourceAdapter.class, service.getRaInjector())
                    .addListener(verificationHandler).install();

            serviceControllers.add(controller);
View Full Code Here

        final ServiceController<?> resourceAdaptersService = context.getServiceRegistry(false).getService(
                ConnectorServices.RESOURCEADAPTERS_SERVICE);
        ServiceController<?> controller = null;
        if (resourceAdaptersService == null) {
            controller = serviceTarget.addService(ConnectorServices.RESOURCEADAPTERS_SERVICE,
                    new ResourceAdaptersService()).setInitialMode(Mode.ACTIVE).addListener(verificationHandler).install();
        }
        ServiceName raServiceName = ServiceName.of(ConnectorServices.RA_SERVICE, name);

        ResourceAdapterService raService = new ResourceAdapterService(resourceAdapter);
View Full Code Here

                    new ResourceAdaptersService()).setInitialMode(Mode.ACTIVE).addListener(verificationHandler).install();
        }
        ServiceName raServiceName = ServiceName.of(ConnectorServices.RA_SERVICE, name);

        ResourceAdapterService raService = new ResourceAdapterService(resourceAdapter);
        serviceTarget.addService(raServiceName, raService).setInitialMode(Mode.ACTIVE)
                .addDependency(ConnectorServices.RESOURCEADAPTERS_SERVICE, ResourceAdaptersService.ModifiableResourceAdaptors.class, raService.getResourceAdaptersInjector())
                .addListener(verificationHandler).install();


    }
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.