2008年10月28日星期二

jBPM用户指南-CH05


第五章 部署


jBPM是一个可嵌入的BPM引擎,意思是你可以把jPBM嵌入到你自己的java工程,而不是安装一个独立的产品并与它集成。最关键的一方面是它使最小化依赖变为可能。本章讨论jbpm库和他们的依赖关系。
5.1.Java运行时环境
jPBM3要求J2SE1.4.2及以上版本。

5.2.jBPM库
jbpm-[version].jar是带有核心jbpm功能的库。

jbpm-identity-[version].jar是包含身份验证组件可选库,在11.11"身份验证组件"描述。

5.3.第三方库
在一个最小的部署中,你可以只把commons-logging和dom4j库放到你的classpath中就可以用jBPM创建并运行流程。但持久化流程到数据库中是不被支持的。如果你不使用流程xml解析,dom4j库是可以移除的,但你必须用编程的方式来构建你的对象图。


















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/jboss (from jboss 4.0.3)


一个jBPM的典型部署将包含流程定义和流程执行的持久化存储。在那种情况下,jBPM在hibernate之外不必依赖任何依赖库。
当然,hibernate要求的苦取决于你所用的环境和特性。更多的细节请参考hibernate文档。下一个表给出了普通的独立POJO开发环境的指示。
jBPM最终和hibernate3.1一起发布。但它可以和3.0.x.一起工作。在那种情况下,你必须在hibernate.queries.hbm.xml配置文件中更新一点hibernate查询。关于定制查询的更多信息,请看7.6节“定制查询”。
表 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 persistencelib/jboss (from jboss 4.0.3)
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
jaxen-1.1-beta-4.jarprocess definitions and hibernate persistenceXPath library (used by dom4j)lib/hibernate
jdbc2_0-stdext.jar hibernate persistencelib/hibernate
asm.jarhibernate persistenceasm byte code librarylib/hibernate
asm-attrs.jarhibernate persistenceasm byte code librarylib/hibernate



beanshell库是可选的。如果你不包含它,你将不能集成beanshell到你的jbpm流程语言中,且你将会得到一条消息说jbpm不能装载Script类,同时,script元素将不可用。

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

没有评论: