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 initialise() { if (processEngine == null) { Configuration config = new Configuration(); if (configurationResource != null) { config.setResource(configurationResource); } setProcessEngine(config.buildProcessEngine()); containerManaged = false; } if (processDefinitions != null) { for (Object def : processDefinitions.values()) { try { deployProcess((String) def); } catch (IOException e) { log.error("Unable to deploy process definition: " + e.getMessage()); } } } }
public void start() { log.debug("JbpmService starting..."); this.processEngine = Configuration.getProcessEngine(); log.info("JbpmService started"); }
@Override public void initialise() { if (processEngine == null) { Configuration config = new Configuration(); if (configurationResource != null) { config.setResource(configurationResource); } setProcessEngine(config.buildProcessEngine()); containerManaged = false; } if (processDefinitions != null) { for (Object def : processDefinitions.values()) { try { deployProcess((String) def); } catch (IOException e) { log.error("Unable to deploy process definition: " + e.getMessage()); } } } }
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); } }