Search in sources :

Example 1 with BpmPlatformPlugin

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);
        }
    }
}
Also used : BpmPlatformPlugin(org.camunda.bpm.container.impl.plugin.BpmPlatformPlugin) AbstractProcessApplication(org.camunda.bpm.application.AbstractProcessApplication) JmxManagedBpmPlatformPlugins(org.camunda.bpm.container.impl.jmx.services.JmxManagedBpmPlatformPlugins) PlatformServiceContainer(org.camunda.bpm.container.impl.spi.PlatformServiceContainer)

Example 2 with BpmPlatformPlugin

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();
        }
    }
}
Also used : BpmPlatformPlugins(org.camunda.bpm.container.impl.plugin.BpmPlatformPlugins) BpmPlatformPlugin(org.camunda.bpm.container.impl.plugin.BpmPlatformPlugin) ComponentView(org.jboss.as.ee.component.ComponentView) ManagedReference(org.jboss.as.naming.ManagedReference) ProcessApplicationInterface(org.camunda.bpm.application.ProcessApplicationInterface) StartException(org.jboss.msc.service.StartException)

Example 3 with BpmPlatformPlugin

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;
}
Also used : BpmPlatformPlugin(org.camunda.bpm.container.impl.plugin.BpmPlatformPlugin)

Aggregations

BpmPlatformPlugin (org.camunda.bpm.container.impl.plugin.BpmPlatformPlugin)3 AbstractProcessApplication (org.camunda.bpm.application.AbstractProcessApplication)1 ProcessApplicationInterface (org.camunda.bpm.application.ProcessApplicationInterface)1 JmxManagedBpmPlatformPlugins (org.camunda.bpm.container.impl.jmx.services.JmxManagedBpmPlatformPlugins)1 BpmPlatformPlugins (org.camunda.bpm.container.impl.plugin.BpmPlatformPlugins)1 PlatformServiceContainer (org.camunda.bpm.container.impl.spi.PlatformServiceContainer)1 ComponentView (org.jboss.as.ee.component.ComponentView)1 ManagedReference (org.jboss.as.naming.ManagedReference)1 StartException (org.jboss.msc.service.StartException)1