예제 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected void performRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws org.jboss.as.controller.OperationFailedException
        protected internal virtual void performRuntime(OperationContext context, ModelNode operation, ModelNode model)
        {
            string      suffix = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).LastElement.Value;
            ServiceName name   = ServiceNames.forManagedProcessEngine(suffix);

            context.removeService(name);
        }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override protected void performRuntime(final org.jboss.as.controller.OperationContext context, final org.jboss.dmr.ModelNode operation, final org.jboss.dmr.ModelNode model) throws org.jboss.as.controller.OperationFailedException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
        protected internal override void performRuntime(OperationContext context, ModelNode operation, ModelNode model)
        {
            string      jobExecutorThreadPoolName        = SubsystemAttributeDefinitons.THREAD_POOL_NAME.resolveModelAttribute(context, model).asString();
            ServiceName jobExecutorThreadPoolServiceName = ServiceNames.forManagedThreadPool(jobExecutorThreadPoolName);

            performRuntimeThreadPool(context, model, jobExecutorThreadPoolName, jobExecutorThreadPoolServiceName);

            MscExecutorService service = new MscExecutorService();
            ServiceController <MscExecutorService> serviceController = context.ServiceTarget.addService(ServiceNames.forMscExecutorService(), service).addDependency(jobExecutorThreadPoolServiceName, typeof(ManagedQueueExecutorService), service.ManagedQueueInjector).setInitialMode(ServiceController.Mode.ACTIVE).install();
        }
예제 #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected void performRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws org.jboss.as.controller.OperationFailedException
        protected internal virtual void performRuntime(OperationContext context, ModelNode operation, ModelNode model)
        {
            ServiceName name = ServiceNames.forMscExecutorService();

            context.removeService(name);

            string      jobExecutorThreadPoolName        = SubsystemAttributeDefinitons.THREAD_POOL_NAME.resolveModelAttribute(context, model).asString();
            ServiceName jobExecutorThreadPoolServiceName = ServiceNames.forManagedThreadPool(jobExecutorThreadPoolName);

            context.removeService(jobExecutorThreadPoolServiceName);
        }
예제 #4
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) throws org.jboss.as.controller.OperationFailedException
        protected internal virtual void performRuntimeThreadPool(OperationContext context, ModelNode model, string name, ServiceName jobExecutorThreadPoolServiceName)
        {
            ServiceTarget serviceTarget = context.ServiceTarget;

            ThreadFactoryService threadFactory = new ThreadFactoryService();

            threadFactory.ThreadGroupName = THREAD_POOL_GRP_NAME + name;

            ServiceName threadFactoryServiceName = ServiceNames.forThreadFactoryService(name);

            serviceTarget.addService(threadFactoryServiceName, threadFactory).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());

            serviceTarget.addService(jobExecutorThreadPoolServiceName, threadPoolService).addDependency(threadFactoryServiceName, typeof(ThreadFactory), threadPoolService.ThreadFactoryInjector).setInitialMode(ServiceController.Mode.ACTIVE).install();
        }
예제 #5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected void performRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws org.jboss.as.controller.OperationFailedException
        protected internal virtual void performRuntime(OperationContext context, ModelNode operation, ModelNode model)
        {
            string jobAcquisitionName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).LastElement.Value;

            context.removeService(ServiceNames.forMscRuntimeContainerJobExecutorService(jobAcquisitionName));
        }
예제 #6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void deploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext) throws org.jboss.as.server.deployment.DeploymentUnitProcessingException
        public virtual void deploy(DeploymentPhaseContext phaseContext)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.jboss.as.server.deployment.DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
            DeploymentUnit deploymentUnit = phaseContext.DeploymentUnit;

            if (deploymentUnit.Parent == null)
            {
                //The deployment unit has no parent so it is a simple war or an ear.
                ModuleLoader moduleLoader = Module.BootModuleLoader;
                //If it is a simpleWar and marked with process application we have to add the dependency
                bool isProcessApplicationWarOrEar = ProcessApplicationAttachments.isProcessApplication(deploymentUnit);

                AttachmentList <DeploymentUnit> subdeployments = deploymentUnit.getAttachment(Attachments.SUB_DEPLOYMENTS);
                //Is the list of sub deployments empty the deployment unit is a war file.
                //In cases of war files we have nothing todo.
                if (subdeployments != null)
                {
                    //The deployment unit contains sub deployments which means the deployment unit is an ear.
                    //We have to check whether sub deployments are process applications or not.
                    bool subDeploymentIsProcessApplication = false;
                    foreach (DeploymentUnit subDeploymentUnit in subdeployments)
                    {
                        if (ProcessApplicationAttachments.isProcessApplication(subDeploymentUnit))
                        {
                            subDeploymentIsProcessApplication = true;
                            break;
                        }
                    }
                    //If one sub deployment is a process application then we add to all the dependency
                    //Also we have to add the dependency to the current deployment unit which is an ear
                    if (subDeploymentIsProcessApplication)
                    {
                        foreach (DeploymentUnit subDeploymentUnit in subdeployments)
                        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.jboss.as.server.deployment.module.ModuleSpecification moduleSpecification = subDeploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE_SPECIFICATION);
                            ModuleSpecification moduleSpecification = subDeploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
                            addSystemDependencies(moduleLoader, moduleSpecification);
                        }
                        //An ear is not marked as process application but also needs the dependency
                        isProcessApplicationWarOrEar = true;
                    }
                }

                if (isProcessApplicationWarOrEar)
                {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.jboss.as.server.deployment.module.ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE_SPECIFICATION);
                    ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
                    addSystemDependencies(moduleLoader, moduleSpecification);
                }
            }

            // install the pa-module service
            ModuleIdentifier identifyer = deploymentUnit.getAttachment(Attachments.MODULE_IDENTIFIER);
            string           moduleName = identifyer.ToString();

            ProcessApplicationModuleService processApplicationModuleService = new ProcessApplicationModuleService();
            ServiceName serviceName = ServiceNames.forProcessApplicationModuleService(moduleName);

            phaseContext.ServiceTarget.addService(serviceName, processApplicationModuleService).addDependency(phaseContext.PhaseServiceName).setInitialMode(Mode.ACTIVE).install();
        }
예제 #7
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) throws org.jboss.as.controller.OperationFailedException
        protected internal override void performBoottime(OperationContext context, ModelNode operation, ModelNode model)
        {
            // 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).setInitialMode(org.jboss.msc.service.ServiceController.Mode.ACTIVE).install();
            ServiceController <MscRuntimeContainerDelegate> controller = context.ServiceTarget.addService(ServiceNames.forMscRuntimeContainerDelegate(), processEngineService).setInitialMode(ServiceController.Mode.ACTIVE).install();

            // 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).setInitialMode(ServiceController.Mode.ACTIVE).install();
        }
예제 #8
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected void performRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws org.jboss.as.controller.OperationFailedException
        protected internal virtual void performRuntime(OperationContext context, ModelNode operation, ModelNode model)
        {
            ServiceName name = ServiceNames.forMscExecutorService();

            context.removeService(name);
        }