本文整理汇总了Java中org.activiti.engine.ProcessEngineConfiguration.createProcessEngineConfigurationFromResource方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessEngineConfiguration.createProcessEngineConfigurationFromResource方法的具体用法?Java ProcessEngineConfiguration.createProcessEngineConfigurationFromResource怎么用?Java ProcessEngineConfiguration.createProcessEngineConfigurationFromResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.ProcessEngineConfiguration
的用法示例。
在下文中一共展示了ProcessEngineConfiguration.createProcessEngineConfigurationFromResource方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeProcessEngine
import org.activiti.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
protected void initializeProcessEngine() {
if (cachedProcessEngine == null) {
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("activiti.jpa.cfg.xml");
cachedProcessEngine = processEngineConfiguration.buildProcessEngine();
EntityManagerSessionFactory entityManagerSessionFactory = (EntityManagerSessionFactory) processEngineConfiguration
.getSessionFactories()
.get(EntityManagerSession.class);
System.out.println("entityManagerSessionFactory=" + entityManagerSessionFactory);
entityManagerFactory = entityManagerSessionFactory.getEntityManagerFactory();
}
processEngine = cachedProcessEngine;
}
示例2: initializeProcessEngine
import org.activiti.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
protected void initializeProcessEngine() {
if (cachedProcessEngine == null) {
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("activiti.jpa.cfg.xml");
cachedProcessEngine = processEngineConfiguration.buildProcessEngine();
EntityManagerSessionFactory entityManagerSessionFactory = (EntityManagerSessionFactory) processEngineConfiguration
.getSessionFactories()
.get(EntityManagerSession.class);
entityManagerFactory = entityManagerSessionFactory.getEntityManagerFactory();
}
processEngine = cachedProcessEngine;
}
示例3: testMyBatisConnectionPoolProperlyConfigured
import org.activiti.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
public void testMyBatisConnectionPoolProperlyConfigured() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("org/activiti/engine/test/db/connection-pool.activiti.cfg.xml");
config.buildProcessEngine();
// Expected values
int maxActive = 25;
int maxIdle = 10;
int maxCheckoutTime = 30000;
int maxWaitTime = 25000;
assertEquals(maxActive, config.getJdbcMaxActiveConnections());
assertEquals(maxIdle, config.getJdbcMaxIdleConnections());
assertEquals(maxCheckoutTime, config.getJdbcMaxCheckoutTime());
assertEquals(maxWaitTime, config.getJdbcMaxWaitTime());
// Verify that these properties are correctly set in the MyBatis datasource
DataSource datasource = config.getDbSqlSessionFactory().getSqlSessionFactory().getConfiguration().getEnvironment().getDataSource();
assertTrue(datasource instanceof PooledDataSource);
PooledDataSource pooledDataSource = (PooledDataSource) datasource;
assertEquals(maxActive, pooledDataSource.getPoolMaximumActiveConnections());
assertEquals(maxIdle, pooledDataSource.getPoolMaximumIdleConnections());
assertEquals(maxCheckoutTime, pooledDataSource.getPoolMaximumCheckoutTime());
assertEquals(maxWaitTime, pooledDataSource.getPoolTimeToWait());
}
示例4: initializeProcessEngine
import org.activiti.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
protected void initializeProcessEngine() {
if (cachedProcessEngine==null) {
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("org/activiti/standalone/jpa/activiti.cfg.xml");
cachedProcessEngine = processEngineConfiguration.buildProcessEngine();
EntityManagerSessionFactory entityManagerSessionFactory = (EntityManagerSessionFactory) processEngineConfiguration
.getSessionFactories()
.get(EntityManagerSession.class);
entityManagerFactory = entityManagerSessionFactory.getEntityManagerFactory();
}
processEngine = cachedProcessEngine;
}