本文整理汇总了Java中org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration.setJdbcPassword方法的典型用法代码示例。如果您正苦于以下问题:Java StandaloneInMemProcessEngineConfiguration.setJdbcPassword方法的具体用法?Java StandaloneInMemProcessEngineConfiguration.setJdbcPassword怎么用?Java StandaloneInMemProcessEngineConfiguration.setJdbcPassword使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration
的用法示例。
在下文中一共展示了StandaloneInMemProcessEngineConfiguration.setJdbcPassword方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration; //导入方法依赖的package包/类
public static void init() throws SQLException {
Bus.register(new OrderCamunda());
// Configure Camunda engine (in this case using in memory H2)
StandaloneInMemProcessEngineConfiguration conf = new StandaloneInMemProcessEngineConfiguration();
conf.setJobExecutorActivate(true);
conf.setHistoryLevel(HistoryLevel.HISTORY_LEVEL_FULL);
conf.setJdbcUsername("sa");
conf.setJdbcPassword("sa");
camunda = conf.buildProcessEngine();
// and start H2 database server to allow inspection from the outside
Server.createTcpServer(new String[] { "-tcpPort", "8092", "-tcpAllowOthers" }).start();
// Define flow
BpmnModelInstance flow = extendedFlowOfActivities();
// Deploy finished flow to Camunda
camunda.getRepositoryService().createDeployment() //
.addModelInstance("order.bpmn", flow) //
.deploy();
// Only for demo: write flow to file, so we can open it in modeler
Bpmn.writeModelToFile(new File("order.bpmn"), flow);
}
示例2: startUpEngineAndInit
import org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration; //导入方法依赖的package包/类
public static ProcessEngine startUpEngineAndInit() {
Server h2Server = null;
StandaloneInMemProcessEngineConfiguration config = new StandaloneInMemProcessEngineConfiguration();
config.setHistoryLevel(HistoryLevel.HISTORY_LEVEL_FULL);
config.setJdbcUsername("sa");
config.setJdbcPassword("sa");
// if the DB was already started (by another engine in another Microservice)
// connect to this DB instead of starting an own one
if (isH2DbAlreadyRunning()) {
config.setJdbcUrl(h2DbJdbcUrl);
config.setDatabaseSchemaUpdate("false");
} else {
// use in memory DB, but expose as server
config.setJdbcUrl(h2DbServerJdbcUrl);
h2Server = startH2Server();
}
ProcessEngine engine = config.buildProcessEngine();
// create Demo users and add enterprise license (if existent in file
// ~/.camunda/build.properties)
LicenseHelper.setLicense(engine);
UserGenerator.createDefaultUsers(engine);
final Server h2 = h2Server;
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
try {
engine.close();
if (h2!=null) {
h2.stop();
}
} catch (Exception e) {
throw new RuntimeException("Could not disconnect: " + e.getMessage(), e);
}
}
});
return engine;
}