Search in sources :

Example 16 with ProcessEngineImpl

use of org.camunda.bpm.engine.impl.ProcessEngineImpl in project camunda-bpm-platform by camunda.

the class EmbeddedProcessApplicationTest method testDeployAppWithCustomEngine.

public void testDeployAppWithCustomEngine() {
    TestApplicationWithCustomEngine processApplication = new TestApplicationWithCustomEngine();
    processApplication.deploy();
    ProcessEngine processEngine = BpmPlatform.getProcessEngineService().getProcessEngine("embeddedEngine");
    assertNotNull(processEngine);
    assertEquals("embeddedEngine", processEngine.getName());
    ProcessEngineConfiguration configuration = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration();
    // assert engine properties specified
    assertTrue(configuration.isJobExecutorDeploymentAware());
    assertTrue(configuration.isJobExecutorPreferTimerJobs());
    assertTrue(configuration.isJobExecutorAcquireByDueDate());
    assertEquals(5, configuration.getJdbcMaxActiveConnections());
    processApplication.undeploy();
}
Also used : ProcessEngineConfiguration(org.camunda.bpm.engine.ProcessEngineConfiguration) ProcessEngineImpl(org.camunda.bpm.engine.impl.ProcessEngineImpl) ProcessEngine(org.camunda.bpm.engine.ProcessEngine)

Example 17 with ProcessEngineImpl

use of org.camunda.bpm.engine.impl.ProcessEngineImpl in project camunda-bpm-platform by camunda.

the class ProcessEngineJobExecutorPerformanceTestCase method setup.

@Override
@Before
public void setup() {
    super.setup();
    ProcessEngineConfigurationImpl engineConfiguration = ((ProcessEngineImpl) engine).getProcessEngineConfiguration();
    jobExecutor = engineConfiguration.getJobExecutor();
    jobExecutor.start();
}
Also used : ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl) ProcessEngineImpl(org.camunda.bpm.engine.impl.ProcessEngineImpl) Before(org.junit.Before)

Aggregations

ProcessEngineImpl (org.camunda.bpm.engine.impl.ProcessEngineImpl)17 ProcessEngineConfigurationImpl (org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)7 CommandContext (org.camunda.bpm.engine.impl.interceptor.CommandContext)5 CommandExecutor (org.camunda.bpm.engine.impl.interceptor.CommandExecutor)3 Charset (java.nio.charset.Charset)2 CachePurgeReport (org.camunda.bpm.engine.impl.persistence.deploy.cache.CachePurgeReport)2 Test (org.junit.Test)2 Date (java.util.Date)1 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)1 ProcessEngineConfiguration (org.camunda.bpm.engine.ProcessEngineConfiguration)1 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)1 RepositoryService (org.camunda.bpm.engine.RepositoryService)1 ManagementServiceImpl (org.camunda.bpm.engine.impl.ManagementServiceImpl)1 StandaloneInMemProcessEngineConfiguration (org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration)1 AcquireJobsCmd (org.camunda.bpm.engine.impl.cmd.AcquireJobsCmd)1 PersistenceSession (org.camunda.bpm.engine.impl.db.PersistenceSession)1 JobExecutor (org.camunda.bpm.engine.impl.jobexecutor.JobExecutor)1 DatabasePurgeReport (org.camunda.bpm.engine.impl.management.DatabasePurgeReport)1 PurgeReport (org.camunda.bpm.engine.impl.management.PurgeReport)1 Deployment (org.camunda.bpm.engine.repository.Deployment)1