-
1. Re: EAR for BPM services
tom.baeyens Mar 30, 2006 7:33 AM (in response to jimrigsbee)we should support both EAR and WAR.
By default i want a war that is also deployable on tomcat...
I don't mind if there are targets that build and deploy an ear in the build.deploy.xml. -
2. Re: EAR for BPM services
jimrigsbee Mar 30, 2006 8:13 AM (in response to jimrigsbee)No problem, I agree...forgot about pure servlet containers like Tomcat, good catch.
Regards, Jim -
3. Re: EAR for BPM services
svetzal Mar 30, 2006 8:33 AM (in response to jimrigsbee)I think ClassLoader issues will plague anyone deploying the WAR to JBoss who does not understand them. Right now, I class myself there - slowly untangling what I need to understand to complete the vision in my head.
Domain-specific ActionHandler classes that are direct EJB clients is one area I've had trouble.
Right now, our strategy is decoupling the workflow from the domain logic using JMS queues, but I expect others will share my initial desire to use domain-specific logic in their ActionHandlers.
One thing I have not yet tried is bundling the jbpm.sar in the EAR so that it too shares the same class-loader, but this seems non-scalable - especially if you want to orchestrate several applications with a single workflow engine.
My panacea is an isolated workflow engine that can have workflows arbitrarily deployed to it, each with self-contained domain knowledge (ie ejb-client jars embedded).
Am I crazy here not being able to get this to work easily? Perhaps our stand-alone process deployer is not doing something that it should be?public void init(DeploymentInfo di) throws DeploymentException { log.info("Deploying jBPM archive: " + di.url); try { // parse for getting name ProcessDefinition processDef = ProcessDefinition.parseParZipInputStream(new ZipInputStream(new FileInputStream(di.url.getPath()))); String name = processDef.getName(); InitialContext iniCtx = new InitialContext(); JbpmConfiguration conf = (JbpmConfiguration) iniCtx.lookup("java:/jbpm/JbpmConfiguration"); ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(di.url.getPath())); ProcessDefinition pd = ProcessDefinition.parseParZipInputStream(zipInputStream); JbpmContext ctx = conf.createJbpmContext(); ctx.deployProcessDefinition(pd); ProcessDefinition latestPd = ctx.getGraphSession().findLatestProcessDefinition(name); if (latestPd != null) { log.info("Deployed process \"" + name + "\" version: " + latestPd.getVersion()); } else { log.info("Error deploying: " + name); } } catch (NamingException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } }