郑州市新开楼盘价格表:第五章. 发布

来源:百度文库 编辑:偶看新闻 时间:2024/04/30 15:59:56
第五章 发布前一页   后一页

第五章 发布

本章讨论用jBPM库和配置文件的发布问题. 发布流程到jPBM数据库,参看 章节  13.1.1, “发布流程文档”

5.1. 运行相关

5.1.1. Java运行环境

jBPM 3 requires J2SE 1.4.2+

5.1.2. jBPM 库

jbpm-[version].jar 包含核心jbmp功能.

jbpm-identity-[version].jar   (可选) 库包含身份组件 章节9.9, “身份组件”.

5.1.3. 运行时间库

核心jBPM代码唯一相关的库是commons logging. 其他的库都是可选的. 当然, xml解析和永久化依赖其他的库.

大多数的jBPM的发布依赖hibernate 3.0 库来做永久化.

表格 5.1. 

库用法描述目录commons-logging-1.0.4.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/hibernatedom4j-1.6.jar流程定义和hibernate 永久化xml解析lib/hibernatejaxen-1.1-beta-4.jar流程定义和hibernate 永久化xml解析(这个库是dom4j要使用)lib/hibernateantlr-2.7.4.jarhibernate 永久化hibernate查询解析的时候要用来生成解析lib/hibernatec3p0-0.8.5.jarhibernate 永久化 (默认的配置)连接池. When configuring a different connection pooling (e.g. an appserver datasource), this library is not required.lib/hibernatecglib-full-2.0.2.jarhibernate 永久化code generation librarylib/hibernatecommons-collections-2.1.1.jarhibernate 永久化 lib/hibernateehcache-1.1.jarhibernate 永久化 (in the default configuration)second level cache implementation. When configuring a different cache provider for hibernate, this library is not required.lib/hibernatehibernate3-rc1.jarhibernate 永久化the best O/R mapperlib/hibernatejdbc2_0-stdext.jarhibernate 永久化 lib/hibernatejta.jarhibernate 永久化 lib/hibernatebsh-2.0b2.jarbeanshell script interpretionOnly 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/bsh

5.2. 配置文件

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.

5.2.1. jbpm.properties

下列属性都是在配置文件jbpm.properties中使用的

Table 5.2. 

属性默认值Descriptionjbpm.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.xmlhibernate.cfg.xmlthe resource location of the hibernate.cfg.xml configuration filejbpm.hibernate.properties if specified, it will overrde *ALL* properties that are specified in the hibernate.cfg.xml file.jbpm.authenticatororg.jbpm.security.authenticator.JbpmDefaultAuthenticatora fully qualified classname of a class that implements the org.jbpm.security.authenticator.Authenticator interface.jbpm.authorizerno 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.classorg.jbpm.taskmgmt.exe.TaskInstancethe fully qualified classname to use for task instances. this allows for customizations of the task list entries.

5.2.2. Hibernate cfg xml file

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

5.2.3. Business calendar configuration file

Contains the definition of business hours and free time.

Location: org/jbpm/calendar/jbpm.business.calendar.properties

5.2.4. Variable mapping configuration file

Specifies how the values of the process variables (java objects) are converted to variable instances for storage in the jbpm database.

Location: org/jbpm/context/exe/jbpm.varmapping.properties

5.2.5. Converter configuration file

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.

Location: org/jbpm/db/hibernate/jbpm.converter.properties

5.2.6. Default modules configuration file

specifies which modules are added to a new ProcessDefinition by default.

Location: org/jbpm/graph/def/jbpm.default.modules.properties

5.2.7. Process archive parsers configuration file

specifies the phases of process archive parsing

Location: org/jbpm/jpdl/par/jbpm.parsers.xml

5.3. jBPM in a web application

Simply put the runtime libraries in the WEB-INF/lib folder of your web application archive (.war).

5.4. jBPM 在EJB容器中

JBoss jBPM 可被发布到任何应用服务器. 虽然当前只是在JBOSS应用服务器上测试过.

最简单的方式是把所有 运行时间库 放到你的应用服务器的全局的classpath里.

另外一个办法是, 你可以把 运行时间库 放在 application.xml 并且它们作为库引用.

包含jBPM的新手工具箱作为服务文档.


前一页 Up 后一页第四章面向图的程序设计Home 第六章永久化