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


Java ProcessEngineConfiguration.buildProcessEngine方法代码示例

本文整理汇总了Java中org.camunda.bpm.engine.ProcessEngineConfiguration.buildProcessEngine方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessEngineConfiguration.buildProcessEngine方法的具体用法?Java ProcessEngineConfiguration.buildProcessEngine怎么用?Java ProcessEngineConfiguration.buildProcessEngine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.camunda.bpm.engine.ProcessEngineConfiguration的用法示例。


在下文中一共展示了ProcessEngineConfiguration.buildProcessEngine方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updated

import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
@Override
public void updated(String pid, Dictionary properties) throws ConfigurationException {
  if (existingEngines.containsKey(pid)) {
    existingEngines.get(pid).close();
    existingEngines.remove(pid);
    existingRegisteredEngines.get(pid).unregister();
    existingRegisteredEngines.remove(pid);
  }
  if (!hasPropertiesConfiguration(properties)) {
    return;
  }
  ClassLoader previous = Thread.currentThread().getContextClassLoader();
  ProcessEngine engine;
  try {
    ClassLoader cl = new BundleDelegatingClassLoader(bundle);
    Thread.currentThread().setContextClassLoader(
        new ClassLoaderWrapper(cl, ProcessEngineFactory.class.getClassLoader(), ProcessEngineConfiguration.class.getClassLoader(), previous));
    ProcessEngineConfiguration processEngineConfiguration = createProcessEngineConfiguration(properties);
    processEngineConfiguration.setClassLoader(cl);
    engine = processEngineConfiguration.buildProcessEngine();
  } finally {
    Thread.currentThread().setContextClassLoader(previous);
  }
  existingEngines.put(pid, engine);
  Hashtable<String, Object> props = new Hashtable<String, Object>();
  props.put("process-engine-name", engine.getName());
  ServiceRegistration<ProcessEngine> serviceRegistration = this.bundle.getBundleContext().registerService(ProcessEngine.class, engine, props);
  existingRegisteredEngines.put(pid, serviceRegistration);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform-osgi,代码行数:30,代码来源:ManagedProcessEngineFactoryImpl.java

示例2: ProcessEngineNeedleRule

import org.camunda.bpm.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
ProcessEngineNeedleRule(final Object testInstance, final ProcessEngineConfiguration configuration, final Set<InjectionProvider<?>> injectionProviders) {
  this(testInstance, configuration.buildProcessEngine(), InjectionProviders.supplierForInjectionProviders(injectionProviders));
}
 
开发者ID:camunda,项目名称:camunda-bpm-needle,代码行数:4,代码来源:ProcessEngineNeedleRule.java


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