//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testInstallSubsystemXmlPlatformPlugins() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: public virtual void testInstallSubsystemXmlPlatformPlugins() { string subsystemXml = FileUtils.readFile(SUBSYSTEM_WITH_PROCESS_ENGINES_ELEMENT_ONLY); KernelServices services = createKernelServicesBuilder(null).setSubsystemXml(subsystemXml).build(); ServiceContainer container = services.Container; //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: org.jboss.msc.service.ServiceController<?> serviceController = container.getService(org.camunda.bpm.container.impl.jboss.service.ServiceNames.forBpmPlatformPlugins()); ServiceController <object> serviceController = container.getService(ServiceNames.forBpmPlatformPlugins()); assertNotNull(serviceController); object platformPlugins = serviceController.Value; assertTrue(platformPlugins is BpmPlatformPlugins); assertNotNull(platformPlugins); IList <BpmPlatformPlugin> plugins = ((BpmPlatformPlugins)platformPlugins).Plugins; assertEquals(1, plugins.Count); assertTrue(plugins[0] is ExampleBpmPlatformPlugin); }
public const int PRIORITY = 0x0000; // this can happen at the beginning of the phase //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: @Override public void deploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext) throws org.jboss.as.server.deployment.DeploymentUnitProcessingException public override 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 (!ProcessApplicationAttachments.isProcessApplication(deploymentUnit)) { return; } //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.jboss.as.ee.component.ComponentDescription paComponent = getProcessApplicationComponent(deploymentUnit); ComponentDescription paComponent = getProcessApplicationComponent(deploymentUnit); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.jboss.msc.service.ServiceName paViewServiceName = getProcessApplicationViewServiceName(paComponent); ServiceName paViewServiceName = getProcessApplicationViewServiceName(paComponent); Module module = deploymentUnit.getAttachment(Attachments.MODULE); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final String moduleName = module.getIdentifier().toString(); string moduleName = module.Identifier.ToString(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.jboss.msc.service.ServiceName paStartServiceName = org.camunda.bpm.container.impl.jboss.service.ServiceNames.forProcessApplicationStartService(moduleName); ServiceName paStartServiceName = ServiceNames.forProcessApplicationStartService(moduleName); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.jboss.msc.service.ServiceName paStopServiceName = org.camunda.bpm.container.impl.jboss.service.ServiceNames.forProcessApplicationStopService(moduleName); ServiceName paStopServiceName = ServiceNames.forProcessApplicationStopService(moduleName); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.jboss.msc.service.ServiceName noViewStartService = org.camunda.bpm.container.impl.jboss.service.ServiceNames.forNoViewProcessApplicationStartService(moduleName); ServiceName noViewStartService = ServiceNames.forNoViewProcessApplicationStartService(moduleName); IList <ServiceName> deploymentServiceNames = new List <ServiceName>(); ProcessApplicationStopService paStopService = new ProcessApplicationStopService(); ServiceBuilder <ProcessApplicationStopService> stopServiceBuilder = phaseContext.ServiceTarget.addService(paStopServiceName, paStopService).addDependency(phaseContext.PhaseServiceName).addDependency(ServiceNames.forBpmPlatformPlugins(), typeof(BpmPlatformPlugins), paStopService.PlatformPluginsInjector).setInitialMode(ServiceController.Mode.ACTIVE); if (paViewServiceName != null) { stopServiceBuilder.addDependency(paViewServiceName, typeof(ComponentView), paStopService.PaComponentViewInjector); } else { stopServiceBuilder.addDependency(noViewStartService, typeof(ProcessApplicationInterface), paStopService.NoViewProcessApplication); } stopServiceBuilder.install(); // deploy all process archives IList <ProcessesXmlWrapper> processesXmlWrappers = ProcessApplicationAttachments.getProcessesXmls(deploymentUnit); foreach (ProcessesXmlWrapper processesXmlWrapper in processesXmlWrappers) { ProcessesXml processesXml = processesXmlWrapper.ProcessesXml; foreach (ProcessArchiveXml processArchive in processesXml.ProcessArchives) { ServiceName processEngineServiceName = getProcessEngineServiceName(processArchive); IDictionary <string, sbyte[]> deploymentResources = getDeploymentResources(processArchive, deploymentUnit, processesXmlWrapper.ProcessesXmlFile); // add the deployment service for each process archive we deploy. ProcessApplicationDeploymentService deploymentService = new ProcessApplicationDeploymentService(deploymentResources, processArchive, module); string processArachiveName = processArchive.Name; if (string.ReferenceEquals(processArachiveName, null)) { // use random name for deployment service if name is null (we cannot ask the process application yet since the component might not be up. processArachiveName = System.Guid.randomUUID().ToString(); } ServiceName deploymentServiceName = ServiceNames.forProcessApplicationDeploymentService(deploymentUnit.Name, processArachiveName); ServiceBuilder <ProcessApplicationDeploymentService> serviceBuilder = phaseContext.ServiceTarget.addService(deploymentServiceName, deploymentService).addDependency(phaseContext.PhaseServiceName).addDependency(paStopServiceName).addDependency(processEngineServiceName, typeof(ProcessEngine), deploymentService.ProcessEngineInjector).setInitialMode(ServiceController.Mode.ACTIVE); if (paViewServiceName != null) { // add a dependency on the component start service to make sure we are started after the pa-component (Singleton EJB) has started serviceBuilder.addDependency(paComponent.StartServiceName); serviceBuilder.addDependency(paViewServiceName, typeof(ComponentView), deploymentService.PaComponentViewInjector); } else { serviceBuilder.addDependency(noViewStartService, typeof(ProcessApplicationInterface), deploymentService.NoViewProcessApplication); } JBossCompatibilityExtension.addServerExecutorDependency(serviceBuilder, deploymentService.ExecutorInjector, false); serviceBuilder.install(); deploymentServiceNames.Add(deploymentServiceName); } } AnnotationInstance postDeploy = ProcessApplicationAttachments.getPostDeployDescription(deploymentUnit); AnnotationInstance preUndeploy = ProcessApplicationAttachments.getPreUndeployDescription(deploymentUnit); // register the managed process application start service ProcessApplicationStartService paStartService = new ProcessApplicationStartService(deploymentServiceNames, postDeploy, preUndeploy, module); ServiceBuilder <ProcessApplicationStartService> serviceBuilder = phaseContext.ServiceTarget.addService(paStartServiceName, paStartService).addDependency(phaseContext.PhaseServiceName).addDependency(ServiceNames.forDefaultProcessEngine(), typeof(ProcessEngine), paStartService.DefaultProcessEngineInjector).addDependency(ServiceNames.forBpmPlatformPlugins(), typeof(BpmPlatformPlugins), paStartService.PlatformPluginsInjector).addDependencies(deploymentServiceNames).setInitialMode(ServiceController.Mode.ACTIVE); if (paViewServiceName != null) { serviceBuilder.addDependency(paViewServiceName, typeof(ComponentView), paStartService.PaComponentViewInjector); } else { serviceBuilder.addDependency(noViewStartService, typeof(ProcessApplicationInterface), paStartService.NoViewProcessApplication); } serviceBuilder.install(); }
/// <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); }