use of org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessApplication in project camunda-bpm-platform by camunda.
the class UndeployProcessArchivesStep method performOperationStep.
public void performOperationStep(DeploymentOperation operationContext) {
final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
final AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);
final JmxManagedProcessApplication deployedProcessApplication = serviceContainer.getService(ServiceTypes.PROCESS_APPLICATION, processApplication.getName());
ensureNotNull("Cannot find process application with name " + processApplication.getName(), "deployedProcessApplication", deployedProcessApplication);
Map<String, DeployedProcessArchive> deploymentMap = deployedProcessApplication.getProcessArchiveDeploymentMap();
if (deploymentMap != null) {
List<ProcessesXml> processesXmls = deployedProcessApplication.getProcessesXmls();
for (ProcessesXml processesXml : processesXmls) {
for (ProcessArchiveXml parsedProcessArchive : processesXml.getProcessArchives()) {
DeployedProcessArchive deployedProcessArchive = deploymentMap.get(parsedProcessArchive.getName());
if (deployedProcessArchive != null) {
operationContext.addStep(new UndeployProcessArchiveStep(deployedProcessApplication, parsedProcessArchive, deployedProcessArchive.getProcessEngineName()));
}
}
}
}
}
use of org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessApplication in project camunda-bpm-platform by camunda.
the class InjectionUtil method getProcessApplicationInfo.
public static ProcessApplicationInfo getProcessApplicationInfo(DeploymentOperation operationContext) {
final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
final AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);
JmxManagedProcessApplication managedPa = serviceContainer.getServiceValue(ServiceTypes.PROCESS_APPLICATION, processApplication.getName());
return managedPa.getProcessApplicationInfo();
}
use of org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessApplication in project camunda-bpm-platform by camunda.
the class RuntimeContainerDelegateImpl method getProcessApplicationNames.
// process application service implementation /////////////////////////////////
@Override
public Set<String> getProcessApplicationNames() {
List<JmxManagedProcessApplication> processApplications = serviceContainer.getServiceValuesByType(ServiceTypes.PROCESS_APPLICATION);
Set<String> processApplicationNames = new HashSet<String>();
for (JmxManagedProcessApplication jmxManagedProcessApplication : processApplications) {
processApplicationNames.add(jmxManagedProcessApplication.getProcessApplicationName());
}
return processApplicationNames;
}
use of org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessApplication in project camunda-bpm-platform by camunda.
the class StopProcessApplicationsStep method performOperationStep.
public void performOperationStep(DeploymentOperation operationContext) {
final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
List<JmxManagedProcessApplication> processApplicationsReferences = serviceContainer.getServiceValuesByType(ServiceTypes.PROCESS_APPLICATION);
for (JmxManagedProcessApplication processApplication : processApplicationsReferences) {
stopProcessApplication(processApplication.getProcessApplicationReference());
}
}
use of org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessApplication in project camunda-bpm-platform by camunda.
the class StartProcessApplicationServiceStep method performOperationStep.
public void performOperationStep(DeploymentOperation operationContext) {
final AbstractProcessApplication processApplication = operationContext.getAttachment(PROCESS_APPLICATION);
final Map<URL, ProcessesXml> processesXmls = operationContext.getAttachment(PROCESSES_XML_RESOURCES);
final Map<String, DeployedProcessArchive> processArchiveDeploymentMap = operationContext.getAttachment(PROCESS_ARCHIVE_DEPLOYMENT_MAP);
final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
ProcessApplicationInfoImpl processApplicationInfo = createProcessApplicationInfo(processApplication, processArchiveDeploymentMap);
// create service
JmxManagedProcessApplication mbean = new JmxManagedProcessApplication(processApplicationInfo, processApplication.getReference());
mbean.setProcessesXmls(new ArrayList<ProcessesXml>(processesXmls.values()));
mbean.setDeploymentMap(processArchiveDeploymentMap);
// start service
serviceContainer.startService(ServiceTypes.PROCESS_APPLICATION, processApplication.getName(), mbean);
notifyBpmPlatformPlugins(serviceContainer, processApplication);
}
Aggregations