当前位置: 首页>>代码示例>>Java>>正文


Java ProcessEngineConfiguration.createProcessEngineConfigurationFromResource方法代码示例

本文整理汇总了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;
}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:17,代码来源:LeaveJpaEntityTest.java

示例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;
}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:16,代码来源:LeaveJpaEntityTest.java

示例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());
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:28,代码来源:ConnectionPoolTest.java

示例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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:16,代码来源:JPAVariableTest.java


注:本文中的org.activiti.engine.ProcessEngineConfiguration.createProcessEngineConfigurationFromResource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。