public static ProcessEngine retrieveProcessEngine() { if (processEngine == null) { synchronized (ProcessEngine.class) { if (processEngine == null) { try { InitialContext ctx = new InitialContext(); try { processEngine = (ProcessEngine) ctx.lookup(PROCESS_ENGINE_JNDI_NAME); } finally { ctx.close(); } } catch (NamingException e) { // build a process engine from a default jbpm.cfg.xml processEngine = Configuration.getProcessEngine(); } } } } return processEngine; }
public void start() { log.debug("JbpmService starting..."); this.processEngine = Configuration.getProcessEngine(); log.info("JbpmService started"); }
protected void initializeProcessEngine() { try { InitialContext ctx = new InitialContext(); this.processEngine = (ProcessEngine) ctx.lookup("java:/ProcessEngine"); } catch (Exception e) { // Fall back to default mechanism this.processEngine = Configuration.getProcessEngine(); } this.webServiceHost = (String) processEngine.get("jbpm.console.server.host"); this.webServicePort = (String) processEngine.get("jbpm.console.server.port"); if ( (webServiceHost==null) || (webServicePort==null) ) { throw new JbpmException("make sure that strings 'jbpm.console.server.host' and 'jbpm.console.server.port' are properly configured in the process-engine-context of jbpm.cfg.xml"); } }
protected void initializeProcessEngine() { try { InitialContext ctx = new InitialContext(); this.processEngine = (ProcessEngine) ctx.lookup("java:/ProcessEngine"); } catch (Exception e) { // Fall back to default mechanism this.processEngine = Configuration.getProcessEngine(); } this.webServiceHost = (String) processEngine.get("jbpm.console.server.host"); this.webServicePort = (String) processEngine.get("jbpm.console.server.port"); if ( (webServiceHost==null) || (webServicePort==null) ) { throw new JbpmException("make sure that strings 'jbpm.console.server.host' and 'jbpm.console.server.port' are properly configured in the process-engine-context of jbpm.cfg.xml"); } }
public void start() { this.processEngine = Configuration.getProcessEngine(); try { InitialContext ctx = new InitialContext(); ctx.bind(DEFAULT_JNDI_NAME, new ProcessEngineReference("default", this.processEngine)); // debug out log.info(serverConfig.getImplementationTitle()); log.info(serverConfig.getImplementationVersion()); log.info("ProcessEngine bound to: " + this.jndiName); } catch (Exception e) { throw new RuntimeException("Failed to create JBPMService", e); } }