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


Java StandaloneInMemProcessEngineConfiguration.setJdbcPassword方法代码示例

本文整理汇总了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);
}
 
开发者ID:flowing,项目名称:flowing-retail-concept-java,代码行数:25,代码来源:OrderCamunda.java

示例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;
}
 
开发者ID:flowing,项目名称:flowing-retail-old,代码行数:43,代码来源:CamundaEngineHelper.java


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