Package org.jboss.msc.service

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


                            root, classLoader, cmd, ijmd, raxml);

                    ResourceAdapterDeployment dply = new ResourceAdapterDeployment(module.getIdentifier(), raxmlDeployment);
                    ResourceAdapterXmlDeploymentService service = new ResourceAdapterXmlDeploymentService(dply);
                    // Create the service
                    batchBuilder
                            .addService(ConnectorServices.RESOURCE_ADAPTER_XML_SERVICE_PREFIX.append(deploymentName), service)
                            .addDependency(ConnectorServices.IRONJACAMAR_MDR, MetadataRepository.class, service.getMdrInjector())
                            .addDependency(ConnectorServices.RESOURCE_ADAPTER_REGISTRY_SERVICE,
                                    ResourceAdapterDeploymentRegistry.class, service.getRegistryInjector())
                            .addDependency(ConnectorServices.JNDI_STRATEGY_SERVICE,
View Full Code Here


        final ScaledCount maxThreadsCount = getMaxThreads();
        final int maxThreads = maxThreadsCount.getScaledCount();
        final String name = getName();
        final ServiceName serviceName = ThreadsServices.executorName(name);
        final UnboundedQueueThreadPoolService service = new UnboundedQueueThreadPoolService(maxThreads, getKeepaliveTime());
        final BatchServiceBuilder<ExecutorService> serviceBuilder = builder.addService(serviceName, service);
        addThreadFactoryDependency(serviceName, serviceBuilder, service.getThreadFactoryInjector(), builder);
    }

    @Override
    protected void applyUpdate(final ThreadsSubsystemElement element) throws UpdateFailedException {
View Full Code Here

        final int coreThreads = coreThreadsCount == null ? maxThreads : coreThreadsCount.getScaledCount();
        final int queueLength = this.queueLength.getScaledCount();
        final String name = getName();
        final ServiceName serviceName = ThreadsServices.executorName(name);
        final BoundedQueueThreadPoolService service = new BoundedQueueThreadPoolService(coreThreads, maxThreads, queueLength, blocking, getKeepaliveTime(), allowCoreTimeout);
        final BatchServiceBuilder<Executor> serviceBuilder = builder.addService(serviceName, service);
        addThreadFactoryDependency(serviceName, serviceBuilder, service.getThreadFactoryInjector(), builder);
    }

    protected void applyUpdate(final ThreadsSubsystemElement element) throws UpdateFailedException {
        final BoundedQueueThreadPoolElement poolElement = new BoundedQueueThreadPoolElement(getName());
View Full Code Here

        service.setNamePattern(threadNamePattern);
        service.setPriority(priority);
        service.setThreadGroupName(groupName);
        final UpdateResultHandler.ServiceStartListener<P> listener = new UpdateResultHandler.ServiceStartListener<P>(handler, param);
        final BatchBuilder batchBuilder = updateContext.getBatchBuilder();
        final BatchServiceBuilder<ThreadFactory> builder = batchBuilder.addService(ThreadsServices.threadFactoryName(name), service);
        builder.addListener(listener);
        builder.setInitialMode(ServiceController.Mode.ACTIVE);
        try {
            batchBuilder.install();
        } catch (ServiceRegistryException e) {
View Full Code Here

        final ScaledCount maxThreadsCount = getMaxThreads();
        final int maxThreads = maxThreadsCount.getScaledCount();
        final String name = getName();
        final ServiceName serviceName = ThreadsServices.executorName(name);
        final QueuelessThreadPoolService service = new QueuelessThreadPoolService(maxThreads, blocking, getKeepaliveTime());
        final BatchServiceBuilder<ExecutorService> serviceBuilder = builder.addService(serviceName, service);
        addThreadFactoryDependency(serviceName, serviceBuilder, service.getThreadFactoryInjector(), builder);
    }

    protected void applyUpdate(final ThreadsSubsystemElement element) throws UpdateFailedException {
        final QueuelessThreadPoolElement poolElement = new QueuelessThreadPoolElement(getName());
View Full Code Here

        final ScaledCount maxThreadsCount = getMaxThreads();
        final int maxThreads = maxThreadsCount.getScaledCount();
        final String name = getName();
        final ServiceName serviceName = ThreadsServices.executorName(name);
        final UnboundedQueueThreadPoolService service = new UnboundedQueueThreadPoolService(maxThreads, getKeepaliveTime());
        final BatchServiceBuilder<ExecutorService> serviceBuilder = builder.addService(serviceName, service);
        addThreadFactoryDependency(serviceName, serviceBuilder, service.getThreadFactoryInjector(), builder);
    }

    protected void applyUpdate(final ThreadsSubsystemElement element) throws UpdateFailedException {
        final UnboundedQueueThreadPoolElement poolElement = new UnboundedQueueThreadPoolElement(getName());
View Full Code Here

        NamingContext.initializeNamingManager();

        // Create the Naming Service
        final BatchBuilder builder = updateContext.getBatchBuilder();
        builder.addService(NamingService.SERVICE_NAME, new NamingService(true));

        // Create java: context service
        final JavaContextService javaContextService = new JavaContextService();
        builder.addService(JavaContextService.SERVICE_NAME, javaContextService)
            .addDependency(NamingService.SERVICE_NAME);
View Full Code Here

        final BatchBuilder builder = updateContext.getBatchBuilder();
        builder.addService(NamingService.SERVICE_NAME, new NamingService(true));

        // Create java: context service
        final JavaContextService javaContextService = new JavaContextService();
        builder.addService(JavaContextService.SERVICE_NAME, javaContextService)
            .addDependency(NamingService.SERVICE_NAME);

        final ContextService globalContextService = new ContextService("global");
        builder.addService(JavaContextService.SERVICE_NAME.append("global"), globalContextService)
             .addDependency(JavaContextService.SERVICE_NAME, Context.class, globalContextService.getParentContextInjector());
View Full Code Here

        final JavaContextService javaContextService = new JavaContextService();
        builder.addService(JavaContextService.SERVICE_NAME, javaContextService)
            .addDependency(NamingService.SERVICE_NAME);

        final ContextService globalContextService = new ContextService("global");
        builder.addService(JavaContextService.SERVICE_NAME.append("global"), globalContextService)
             .addDependency(JavaContextService.SERVICE_NAME, Context.class, globalContextService.getParentContextInjector());

        addContextFactory(builder, "app");
        addContextFactory(builder, "module");
        addContextFactory(builder, "comp");
View Full Code Here

        addContextFactory(builder, "app");
        addContextFactory(builder, "module");
        addContextFactory(builder, "comp");

        final JndiView jndiView = new JndiView();
        builder.addService(ServiceName.JBOSS.append("naming", "jndi", "view"), jndiView)
            .addOptionalDependency(ServiceName.JBOSS.append("mbean", "server"), MBeanServer.class, jndiView.getMBeanServerInjector());

    }

    protected NamingSubsystemElement createSubsystemElement() {
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.