use of org.camunda.bpm.container.impl.plugin.BpmPlatformPlugin in project camunda-bpm-platform by camunda.
the class NotifyPostProcessApplicationUndeployedStep method performOperationStep.
@Override
public void performOperationStep(DeploymentOperation operationContext) {
final AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);
final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
final JmxManagedBpmPlatformPlugins plugins = serviceContainer.getService(ServiceTypes.BPM_PLATFORM, RuntimeContainerDelegateImpl.SERVICE_NAME_PLATFORM_PLUGINS);
if (plugins != null) {
for (BpmPlatformPlugin plugin : plugins.getValue().getPlugins()) {
plugin.postProcessApplicationUndeploy(processApplication);
}
}
}
use of org.camunda.bpm.container.impl.plugin.BpmPlatformPlugin in project camunda-bpm-platform by camunda.
the class ProcessApplicationStopService method stop.
@Override
public void stop(StopContext arg0) {
ManagedReference reference = null;
try {
// get the process application component
ProcessApplicationInterface processApplication = null;
ComponentView componentView = paComponentViewInjector.getOptionalValue();
if (componentView != null) {
reference = componentView.createInstance();
processApplication = (ProcessApplicationInterface) reference.getInstance();
} else {
processApplication = noViewProcessApplication.getValue();
}
BpmPlatformPlugins bpmPlatformPlugins = platformPluginsInjector.getValue();
List<BpmPlatformPlugin> plugins = bpmPlatformPlugins.getPlugins();
for (BpmPlatformPlugin bpmPlatformPlugin : plugins) {
bpmPlatformPlugin.postProcessApplicationUndeploy(processApplication);
}
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Exception while invoking BpmPlatformPlugin.postProcessApplicationUndeploy", e);
} finally {
if (reference != null) {
reference.release();
}
}
}
use of org.camunda.bpm.container.impl.plugin.BpmPlatformPlugin in project camunda-bpm-platform by camunda.
the class JmxManagedBpmPlatformPlugins method getPluginNames.
@Override
public String[] getPluginNames() {
// expose names of discovered plugins in JMX
List<BpmPlatformPlugin> pluginList = plugins.getPlugins();
String[] names = new String[pluginList.size()];
for (int i = 0; i < names.length; i++) {
BpmPlatformPlugin bpmPlatformPlugin = pluginList.get(i);
if (bpmPlatformPlugin != null) {
names[i] = bpmPlatformPlugin.getClass().getName();
}
}
return names;
}
Aggregations