Search in sources :

Example 1 with BpmPlatformXmlImpl

use of org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl 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);
}
Also used : ProcessEngineXml(org.camunda.bpm.container.impl.metadata.spi.ProcessEngineXml) JobExecutorXmlImpl(org.camunda.bpm.container.impl.metadata.JobExecutorXmlImpl) DeploymentOperationStep(org.camunda.bpm.container.impl.spi.DeploymentOperationStep) DeploymentOperation(org.camunda.bpm.container.impl.spi.DeploymentOperation) BpmPlatformXmlImpl(org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl) Before(org.junit.Before)

Example 2 with BpmPlatformXmlImpl

use of org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl in project camunda-bpm-platform by camunda.

the class PlatformJobExecutorActivateTest method shouldAutoActivateIfNoPropertySet.

@Test
public void shouldAutoActivateIfNoPropertySet() {
    // given
    JobExecutorXmlImpl jobExecutorXml = defineJobExecutor();
    ProcessEngineXmlImpl processEngineXml = defineProcessEngine();
    BpmPlatformXmlImpl bpmPlatformXml = new BpmPlatformXmlImpl(jobExecutorXml, Collections.<ProcessEngineXml>singletonList(processEngineXml));
    // when
    deployPlatform(bpmPlatformXml);
    try {
        ProcessEngine processEngine = getProcessEngine(ENGINE_NAME);
        ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration();
        // then
        assertEquals(true, processEngineConfiguration.getJobExecutor().isActive());
    } finally {
        undeployPlatform();
    }
}
Also used : ProcessEngineXmlImpl(org.camunda.bpm.container.impl.metadata.ProcessEngineXmlImpl) JobExecutorXmlImpl(org.camunda.bpm.container.impl.metadata.JobExecutorXmlImpl) BpmPlatformXmlImpl(org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl) ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl) ProcessEngine(org.camunda.bpm.engine.ProcessEngine) Test(org.junit.Test)

Example 3 with BpmPlatformXmlImpl

use of org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl in project camunda-bpm-platform by camunda.

the class PlatformJobExecutorActivateTest method shouldNotAutoActivateIfConfigured.

@Test
public void shouldNotAutoActivateIfConfigured() {
    // given
    JobExecutorXmlImpl jobExecutorXml = defineJobExecutor();
    ProcessEngineXmlImpl processEngineXml = defineProcessEngine();
    // activate set to false
    processEngineXml.getProperties().put("jobExecutorActivate", "false");
    BpmPlatformXmlImpl bpmPlatformXml = new BpmPlatformXmlImpl(jobExecutorXml, Collections.<ProcessEngineXml>singletonList(processEngineXml));
    // when
    deployPlatform(bpmPlatformXml);
    try {
        ProcessEngine processEngine = getProcessEngine(ENGINE_NAME);
        ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration();
        // then
        assertEquals(false, processEngineConfiguration.getJobExecutor().isActive());
    } finally {
        undeployPlatform();
    }
}
Also used : ProcessEngineXmlImpl(org.camunda.bpm.container.impl.metadata.ProcessEngineXmlImpl) JobExecutorXmlImpl(org.camunda.bpm.container.impl.metadata.JobExecutorXmlImpl) BpmPlatformXmlImpl(org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl) ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl) ProcessEngine(org.camunda.bpm.engine.ProcessEngine) Test(org.junit.Test)

Aggregations

BpmPlatformXmlImpl (org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl)3 JobExecutorXmlImpl (org.camunda.bpm.container.impl.metadata.JobExecutorXmlImpl)3 ProcessEngineXmlImpl (org.camunda.bpm.container.impl.metadata.ProcessEngineXmlImpl)2 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)2 ProcessEngineConfigurationImpl (org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)2 Test (org.junit.Test)2 ProcessEngineXml (org.camunda.bpm.container.impl.metadata.spi.ProcessEngineXml)1 DeploymentOperation (org.camunda.bpm.container.impl.spi.DeploymentOperation)1 DeploymentOperationStep (org.camunda.bpm.container.impl.spi.DeploymentOperationStep)1 Before (org.junit.Before)1