站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss JBPM 3.1.3 userguide 英文版文档

Chapter 5. Deployment - JBoss JBPM 3.1.3 userguide 英文版文档

Chapter 5. Deployment

jBPM is an embeddable BPM engine, which means that you can take jBPM and embed it into your own java project, rather then installing a separate product and integrate with it. One of the key aspects that make this possible is minimizing the dependencies. This chapter discusses the jbpm libraries and their dependencies.

5.1. Java runtime environment

jBPM 3 requires J2SE 1.4.2+

5.2. jBPM libraries

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 11.11, “The identity component”.

5.3. Third party libraries

In a minimal deployment, you can create and run processes with jBPM by putting only the commons-logging and dom4j library in your classpath. Beware that persisting processes to a database is not supported. The dom4j library can be removed if you don't use the process xml parsing, but instead build your object graph programatically.

Table 5.1. 

LibraryUsageDescriptionDirectory
commons-logging.jarlogging in jbpm and hibernateThe 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/jboss (from jboss 4.0.3)
dom4j-1.6.1.jarprocess definitions and hibernate persistencexml parsinglib/dom4j

A typical deployment for jBPM will include persistent storage of process definitions and process executions. In that case, jBPM does not have any dependencies outside hibernate and its dependent libraries.

Of course, hibernate's required libraries depend on the environment and what features you use. For details refer to the hibernate documentation. The next table gives an indication for a plain standalone POJO development environment.

jBPM is distributed with hibernate 3.1 final. But it can also work with 3.0.x. In that case, you might have to update a few hibernate queries in the hibernate.queries.hbm.xml configuration file. For more info about customizing queries, see Section 7.6, “Customizing queries”

Table 5.2. 

LibraryUsageDescriptionDirectory
hibernate3.jarhibernate persistencethe best O/R mapperlib/hibernate (hibernate 3.1 final)
antlr-2.7.5H3.jarused in query parsing by hibernate persistenceparser librarylib/jboss (from jboss 4.0.3)
cglib-2.1_2jboss.jarhibernate persistencereflection library used for hibernate proxieslib/jboss (from jboss 4.0.3)
commons-collections.jarhibernate persistence lib/jboss (from jboss 4.0.3)
jaxen-1.1-beta-4.jarprocess definitions and hibernate persistenceXPath library (used by dom4j)lib/hibernate
jdbc2_0-stdext.jarhibernate persistence lib/hibernate
asm.jarhibernate persistenceasm byte code librarylib/hibernate
asm-attrs.jarhibernate persistenceasm byte code librarylib/hibernate

The beanshell library is optional. If you don't include it, you won't be able to use the beanshell integration in the jbpm process language and you you'll get a log message saying that jbpm couldn't load the Script class and hence, the script element won't be available.

Table 5.3. 

LibraryUsageDescriptionDirectory
bsh-1.3.0.jarbeanshell script interpreterOnly 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.xmllib/jboss