This chapter discusses the deployment issues for using jBPM like required libraries and configuration files. For deploying processes to a jBPM database, see Section 13.1.1, “Deploying a process archive”
jbpm-[version].jar is the library with the core jbpm functionality.
jbpm-identity-[version].jar is the (optional) library containing an identity component as described in Section 9.9, “The identity component”.
The only dependency of the core jBPM code is on commons logging. All other libraries are optional. Of course, features such as xml parsing and persistence are dependent on other libraries.
For instance for most deployments jBPM will be used with persistence the only dependencies are the hibernate 3.0 libraries.
|commons-logging-1.0.4.jar||logging in jbpm and hibernate||The jBPM code logs to commons logging. The commons logging library can be configured to dispatch the logs to e.g. java 1.4 logging, log4j, ... See the apache commons user guide for more information on how to configure commons logging. if you're used to log4j, the easiest way is to put the log4j lib and a log4j.properties in the classpath. commons logging will automatically detect this and use that configuration.||lib/hibernate|
|dom4j-1.6.jar||process definitions and hibernate persistence||xml parsing||lib/hibernate|
|jaxen-1.1-beta-4.jar||process definitions and hibernate persistence||xml parsing (this library is used by dom4j)||lib/hibernate|
|antlr-2.7.4.jar||hibernate persistence||parser generator used for hibernate query parsing||lib/hibernate|
|c3p0-0.8.5.jar||hibernate persistence (in the default configuration)||connection pooling. When configuring a different connection pooling (e.g. an appserver datasource), this library is not required.||lib/hibernate|
|cglib-full-2.0.2.jar||hibernate persistence||code generation library||lib/hibernate|
|ehcache-1.1.jar||hibernate persistence (in the default configuration)||second level cache implementation. When configuring a different cache provider for hibernate, this library is not required.||lib/hibernate|
|hibernate3-rc1.jar||hibernate persistence||the best O/R mapper||lib/hibernate|
|bsh-2.0b2.jar||beanshell script interpretion||Only used in the script's and decision's. When you don't use these process elements, the beanshell lib can be removed, but then you have to comment out the Script.hbm.xml mapping line in the hibernate.cfg.xml||lib/bsh|
JBoss jBPM requires various configuration files. For your convenience the jbpm library jbpm-3.*.jar includes default configuration files that are packaged in the library. When jBPM loads a configuration file, it will always look first in the root directory. If the configuration file is not found in the root directory, it will look in the package directory that contains the default configuration file. So you can overwrite the default configurations by putting a modified configuration file in the root of the classpath.
Following properties can be specified in the jbpm.properties configuration file
|jbpm.session.factory.jndi.name||if specified, the JbpmSessionFactory.getInstance() method will fetch the singleton instance from the given JNDI location. Otherwise a new JbpmSessionFactory will be created upon initialization of the singleton instance.|
|jbpm.hibernate.cfg.xml||hibernate.cfg.xml||the resource location of the hibernate.cfg.xml configuration file|
|jbpm.hibernate.properties||if specified, it will overrde *ALL* properties that are specified in the hibernate.cfg.xml file.|
|jbpm.authenticator||org.jbpm.security.authenticator.JbpmDefaultAuthenticator||a fully qualified classname of a class that implements the org.jbpm.security.authenticator.Authenticator interface.|
|jbpm.authorizer||no default (means no authorization is enforced)||a fully qualified classname of a class that implements the org.jbpm.security.authorizer.Authorizer interface.|
|jbpm.task.instance.class||org.jbpm.taskmgmt.exe.TaskInstance||the fully qualified classname to use for task instances. this allows for customizations of the task list entries.|
This file contains hibernate configurations and references to the hibernate mapping resource files.
Location: hibernate.cfg.xml unless specified otherwise in the jbpm.hibernate.cfg.xml property in the jbpm.properties file. In the jbpm project the default hibernate cfg xml file is located in directory src/config.files/hibernate.cfg.xml
Contains the definition of business hours and free time.
Specifies how the values of the process variables (java objects) are converted to variable instances for storage in the jbpm database.
Specifies the id-to-classname mappings. The id's are stored in the database. The org.jbpm.db.hibernate.ConverterEnumType is used to map the ids to the singleton objects.
specifies which modules are added to a new ProcessDefinition by default.
Simply put the runtime libraries in the WEB-INF/lib folder of your web application archive (.war).
JBoss jBPM is deployable on any application server. Though currently JBoss jBPM is only tested with the JBoss application server.
Simplest way is to put the runtime libraries into the global classpath of your application server.
Alternatively, you can put the runtime libraries in your application.xml and reference them as libraries.
The starters kit contains jBPM as a service archive.