Exemple #1
0
        protected internal virtual ServiceController <ProcessEngine> installService(OperationContext context, ServiceVerificationHandler verificationHandler, ManagedProcessEngineMetadata processEngineConfiguration)
        {
            MscManagedProcessEngineController service = new MscManagedProcessEngineController(processEngineConfiguration);
            ServiceName name = ServiceNames.forManagedProcessEngine(processEngineConfiguration.EngineName);

            ServiceBuilder <ProcessEngine> serviceBuilder = context.ServiceTarget.addService(name, service);

            MscManagedProcessEngineController.initializeServiceBuilder(processEngineConfiguration, service, serviceBuilder, processEngineConfiguration.JobExecutorAcquisitionName);

            serviceBuilder.addListener(verificationHandler);
            return(serviceBuilder.install());
        }
Exemple #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override protected void performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, ServiceVerificationHandler verificationHandler, java.util.List<org.jboss.msc.service.ServiceController<?>> newControllers) throws OperationFailedException
        protected internal override void performRuntime <T1>(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, IList <T1> newControllers)
        {
            string acquisitionName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).LastElement.Value;

            MscRuntimeContainerJobExecutor mscRuntimeContainerJobExecutor = new MscRuntimeContainerJobExecutor();

            if (model.hasDefined(SubsystemAttributeDefinitons.PROPERTIES.Name))
            {
                IList <Property> properties = SubsystemAttributeDefinitons.PROPERTIES.resolveModelAttribute(context, model).asPropertyList();
                foreach (Property property in properties)
                {
                    PropertyHelper.applyProperty(mscRuntimeContainerJobExecutor, property.Name, property.Value.asString());
                }
            }

            // start new service for job executor
            ServiceController <RuntimeContainerJobExecutor> serviceController = context.ServiceTarget.addService(ServiceNames.forMscRuntimeContainerJobExecutorService(acquisitionName), mscRuntimeContainerJobExecutor).addDependency(ServiceNames.forMscRuntimeContainerDelegate()).addDependency(ServiceNames.forMscExecutorService()).addListener(verificationHandler).setInitialMode(ServiceController.Mode.ACTIVE).install();

            newControllers.Add(serviceController);
        }
Exemple #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override protected void performRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, org.jboss.as.controller.ServiceVerificationHandler verificationHandler, java.util.List<org.jboss.msc.service.ServiceController<?>> newControllers) throws org.jboss.as.controller.OperationFailedException
        protected internal override void performRuntime <T1>(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, IList <T1> newControllers)
        {
            string engineName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).LastElement.Value;

            ManagedProcessEngineMetadata processEngineConfiguration = transformConfiguration(context, engineName, model);

            ServiceController <ProcessEngine> controller = installService(context, verificationHandler, processEngineConfiguration);

            newControllers.Add(controller);
        }
Exemple #4
0
        /// <summary>
        /// {@inheritDoc} </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override protected void performBoottime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, org.jboss.as.controller.ServiceVerificationHandler verificationHandler, java.util.List<org.jboss.msc.service.ServiceController< ? >> newControllers) throws org.jboss.as.controller.OperationFailedException
        protected internal override void performBoottime <T1>(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, IList <T1> newControllers)
        {
            // add deployment processors
            context.addStep(new AbstractDeploymentChainStepAnonymousInnerClass(this)
                            , OperationContext.Stage.RUNTIME);

            // create and register the MSC container delegate.
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.container.impl.jboss.service.MscRuntimeContainerDelegate processEngineService = new org.camunda.bpm.container.impl.jboss.service.MscRuntimeContainerDelegate();
            MscRuntimeContainerDelegate processEngineService = new MscRuntimeContainerDelegate();

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.jboss.msc.service.ServiceController<org.camunda.bpm.container.impl.jboss.service.MscRuntimeContainerDelegate> controller = context.getServiceTarget().addService(org.camunda.bpm.container.impl.jboss.service.ServiceNames.forMscRuntimeContainerDelegate(), processEngineService).addListener(verificationHandler).setInitialMode(org.jboss.msc.service.ServiceController.Mode.ACTIVE).install();
            ServiceController <MscRuntimeContainerDelegate> controller = context.ServiceTarget.addService(ServiceNames.forMscRuntimeContainerDelegate(), processEngineService).addListener(verificationHandler).setInitialMode(ServiceController.Mode.ACTIVE).install();

            newControllers.Add(controller);

            // discover and register bpm platform plugins
            BpmPlatformPlugins    plugins        = BpmPlatformPlugins.load(this.GetType().ClassLoader);
            MscBpmPlatformPlugins managedPlugins = new MscBpmPlatformPlugins(plugins);

            ServiceController <BpmPlatformPlugins> serviceController = context.ServiceTarget.addService(ServiceNames.forBpmPlatformPlugins(), managedPlugins).addListener(verificationHandler).setInitialMode(ServiceController.Mode.ACTIVE).install();

            newControllers.Add(serviceController);
        }
Exemple #5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected void performRuntimeThreadPool(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode model, String name, org.jboss.msc.service.ServiceName jobExecutorThreadPoolServiceName, org.jboss.as.controller.ServiceVerificationHandler verificationHandler, java.util.List<org.jboss.msc.service.ServiceController<?>> newControllers) throws org.jboss.as.controller.OperationFailedException
        protected internal virtual void performRuntimeThreadPool <T1>(OperationContext context, ModelNode model, string name, ServiceName jobExecutorThreadPoolServiceName, ServiceVerificationHandler verificationHandler, IList <T1> newControllers)
        {
            ServiceTarget serviceTarget = context.ServiceTarget;

            ThreadFactoryService threadFactory = new ThreadFactoryService();

            threadFactory.ThreadGroupName = THREAD_POOL_GRP_NAME + name;

            ServiceName threadFactoryServiceName = ServiceNames.forThreadFactoryService(name);

            ServiceBuilder <ThreadFactory> factoryBuilder = serviceTarget.addService(threadFactoryServiceName, threadFactory);

            if (verificationHandler != null)
            {
                factoryBuilder.addListener(verificationHandler);
            }
            if (newControllers != null)
            {
                newControllers.Add(factoryBuilder.install());
            }
            else
            {
                factoryBuilder.install();
            }

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.jboss.as.threads.BoundedQueueThreadPoolService threadPoolService = new org.jboss.as.threads.BoundedQueueThreadPoolService(org.camunda.bpm.container.impl.jboss.extension.SubsystemAttributeDefinitons.CORE_THREADS.resolveModelAttribute(context, model).asInt(), org.camunda.bpm.container.impl.jboss.extension.SubsystemAttributeDefinitons.MAX_THREADS.resolveModelAttribute(context, model).asInt(), org.camunda.bpm.container.impl.jboss.extension.SubsystemAttributeDefinitons.QUEUE_LENGTH.resolveModelAttribute(context, model).asInt(), false, new org.jboss.as.threads.TimeSpec(java.util.concurrent.TimeUnit.SECONDS, org.camunda.bpm.container.impl.jboss.extension.SubsystemAttributeDefinitons.KEEPALIVE_TIME.resolveModelAttribute(context,model).asInt()), org.camunda.bpm.container.impl.jboss.extension.SubsystemAttributeDefinitons.ALLOW_CORE_TIMEOUT.resolveModelAttribute(context, model).asBoolean());
            BoundedQueueThreadPoolService threadPoolService = new BoundedQueueThreadPoolService(SubsystemAttributeDefinitons.CORE_THREADS.resolveModelAttribute(context, model).asInt(), SubsystemAttributeDefinitons.MAX_THREADS.resolveModelAttribute(context, model).asInt(), SubsystemAttributeDefinitons.QUEUE_LENGTH.resolveModelAttribute(context, model).asInt(), false, new TimeSpec(TimeUnit.SECONDS, SubsystemAttributeDefinitons.KEEPALIVE_TIME.resolveModelAttribute(context, model).asInt()), SubsystemAttributeDefinitons.ALLOW_CORE_TIMEOUT.resolveModelAttribute(context, model).asBoolean());

            ServiceBuilder <ManagedQueueExecutorService> builder = serviceTarget.addService(jobExecutorThreadPoolServiceName, threadPoolService).addDependency(threadFactoryServiceName, typeof(ThreadFactory), threadPoolService.ThreadFactoryInjector).setInitialMode(ServiceController.Mode.ACTIVE);

            if (verificationHandler != null)
            {
                builder.addListener(verificationHandler);
            }
            if (newControllers != null)
            {
                newControllers.Add(builder.install());
            }
            else
            {
                builder.install();
            }
        }
Exemple #6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override protected void performRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, org.jboss.as.controller.ServiceVerificationHandler verificationHandler, java.util.List<org.jboss.msc.service.ServiceController<?>> newControllers) throws org.jboss.as.controller.OperationFailedException
        protected internal override void performRuntime <T1>(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, IList <T1> newControllers)
        {
            string      jobExecutorThreadPoolName        = SubsystemAttributeDefinitons.THREAD_POOL_NAME.resolveModelAttribute(context, model).asString();
            ServiceName jobExecutorThreadPoolServiceName = ServiceNames.forManagedThreadPool(jobExecutorThreadPoolName);

            performRuntimeThreadPool(context, model, jobExecutorThreadPoolName, jobExecutorThreadPoolServiceName, verificationHandler, newControllers);

            MscExecutorService service = new MscExecutorService();
            ServiceController <MscExecutorService> serviceController = context.ServiceTarget.addService(ServiceNames.forMscExecutorService(), service).addDependency(jobExecutorThreadPoolServiceName, typeof(ManagedQueueExecutorService), service.ManagedQueueInjector).addListener(verificationHandler).setInitialMode(ServiceController.Mode.ACTIVE).install();

            newControllers.Add(serviceController);
        }
Exemple #7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override protected void performRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, org.jboss.as.controller.ServiceVerificationHandler verificationHandler, java.util.List<org.jboss.msc.service.ServiceController<?>> newControllers) throws org.jboss.as.controller.OperationFailedException
        protected internal override void performRuntime <T1>(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, IList <T1> newControllers)
        {
            if (!operation.hasDefined(THREAD_POOL_NAME))
            {
                throw new ProcessEngineException("Unable to configure threadpool for ContainerJobExecutorService, missing element '" + THREAD_POOL_NAME + "' in JobExecutor configuration.");
            }

            string jobExecutorThreadPoolName = SubsystemAttributeDefinitons.THREAD_POOL_NAME.resolveModelAttribute(context, model).asString();

            MscExecutorService service = new MscExecutorService();
            ServiceController <MscExecutorService> serviceController = context.ServiceTarget.addService(ServiceNames.forMscExecutorService(), service).addDependency(ThreadsServices.EXECUTOR.append(jobExecutorThreadPoolName), typeof(ManagedQueueExecutorService), service.ManagedQueueInjector).addListener(verificationHandler).setInitialMode(ServiceController.Mode.ACTIVE).install();

            newControllers.Add(serviceController);
        }