An Ant script for direct deploying jBPM 5.3 using MySQL as back end has been implemented.

NB: Apache-Ivy is required in addition to Ant.

The script with instructions have been published at 4Share, and can be downloaded here.

H2 / MySQL configuration templates are included.

For further details on the reporting, check here.


To summarise the key observations of Tomcat / jBPM 5.3 installer which precipitated development of the above installer (Please see unresolved errata below though):

Tomcat 7

i) It should be recognised that Tomcat is not a J2EE application server, but is technically a servlet container.

(The implementation of JNDI on Tomcat which differs slightly from EE standard – ie. java:comp/env/… rather than java:comp/…, lack of any J2EE services in standard installation etc. are significant hints at this)

JBPM requires a J2EE application server – eg. JBoss AS / GlassFish / WebLogic / WebSphere etc.

ii) Tomcat can be made to behave like a J2EE server with careful configuration. A good demarcation point though is when application complexity reaches the point where a service bus is required.

iii) Tomcat is arguably the most popular servlet container on the market at moment – however – its success and strengths have clouded the important point that it is strictly not a J2EE application server.

Installation issues of JBPM into Tomcat are mainly rooted in this issue.

In order to configure Tomcat as a J2EE compliant container which can host JBPM – some J2EE services need to be set up on Tomcat. In particular a JTA: A good choice here is the transaction manager from Bitronix.

The above Ant installer will install Bitronix at the Tomcat Server level.

Bitronix only may be deployed by:

a) Configure Bitronix template files btm-config.properties, resources.properties (See the README file)

b) Run: ant install.bitronix.into.tomcat.7

Bitronix can be replaced with a transaction / pool manager of your choice – Bitronix is arguably the best choice in most cases though.

JBPM 5.3 Installer / Distribution – Tomcat

Now on to the issues with the jbpm installer and distribution from the Tomcat perspective:

i) Some dependency issues relating to javassist are still present, and these are corrected. Where appropriate, incorrect versions are removed and replaced with 3.4GA

ii) There are 3 jars included in the drools-guvnor 5.4 distribution which include bad version of javax.servlet for Tomcat 7.

The two key jars (gwt-user-2.3.0.jar, jboss-servlet-api_3.0_spec-1.0.0.Final.jar) are patched by this script to remove the bad javax.servlet – servlet-api-2.5.jar is removed.

iii) Again for drools-guvnor 5.4 – a required JBoss jar is missing: weld-servlet-1.1.8.Final.jar is added.

iv) There is a web hosted version of the human-task server included in this distribution: jta-1.1.jar is removed from that applications lib (This jar should only be present in ${CATALINA_HOME}/lib).

NB: For the demo, with the human task war – the following should work when using MySQL back end:

a) Stop drools-guvnor
b) Restart gwt-console-server
c) Go to: http://localhost/jbpm-human-task-war
(Ignore the error – it should have started: check for a listener on port 9132)
d) Go to: http://localhost/jpbm-gwt-console – and all should be good.

Errata
There is one unresolved issue:

  1. The gwt-console-server has some issues when drools-guvnor is running. With H2 backend – all is fine – with MySQL drools-guvnor will need to be disabled. (See above)

– NB: I can confirm that this is caused by slight issue in gwt-console-server / jbpm-gwt-core-5.3.0.Final.jar

There is currently an open Jira on this: JBPM-3647

Advertisements