use of org.camunda.bpm.container.impl.spi.DeploymentOperation in project camunda-bpm-platform by camunda.
the class StartManagedThreadPoolStepTest method setUp.
@Before
public void setUp() {
step = new StartManagedThreadPoolStep();
deploymentOperation = new DeploymentOperation("name", container, Collections.<DeploymentOperationStep>emptyList());
jobExecutorXml = new JobExecutorXmlImpl();
bpmPlatformXml = new BpmPlatformXmlImpl(jobExecutorXml, Collections.<ProcessEngineXml>emptyList());
deploymentOperation.addAttachment(Attachments.BPM_PLATFORM_XML, bpmPlatformXml);
}
use of org.camunda.bpm.container.impl.spi.DeploymentOperation in project camunda-bpm-platform by camunda.
the class MBeanServiceContainer method startService.
public synchronized <S> void startService(String name, PlatformService<S> service) {
ObjectName serviceName = getObjectName(name);
if (getService(serviceName) != null) {
throw new ProcessEngineException("Cannot register service " + serviceName + " with MBeans Container, service with same name already registered.");
}
final MBeanServer beanServer = getmBeanServer();
// call the service-provided start behavior
service.start(this);
try {
beanServer.registerMBean(service, serviceName);
servicesByName.put(serviceName, service);
Stack<DeploymentOperation> currentOperationContext = activeDeploymentOperations.get();
if (currentOperationContext != null) {
currentOperationContext.peek().serviceAdded(name);
}
} catch (Exception e) {
throw LOG.cannotRegisterService(serviceName, e);
}
}
Aggregations