本文整理汇总了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);
}
示例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));
}