Example #1
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);
        }
Example #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);
        }
Example #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)
        {
            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);
        }