Installing JBoss jBPM 3.2.2 on Apache Tomcat 5.5 and MySQL

  1. Create schema and table in database
    In this example a schema 'jbpm' with a user 'jboss' is used.
    Generate all jBPM tables using the script jbpm.jpdl.mysql.sql. If you want your users/roles information (the identity components) also from the MySQL db, use the second sql script attached here mysql.identity.script.jbpm321.sql to set up the necessary tables and fill them with the demo values.
  2. Prepare your jBPM archive
    1. Open a console in jbpm-jpdl-3.2.2/deploy and run:
      ant customize.console.for.tomcat
    2. This builds a jbpm-console.war in jbpm-jpdl-3.2.2/deploy/customized
    3. Unzip this file and change jbpm-console/WEB-INF/classes/hibernate.cfg.xml to reflect the following changes:
      <hibernate-configuration> <session-factory> <!-- hibernate dialect --> <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property> <!-- JDBC connection properties (begin) --> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm</property> <property name="hibernate.connection.username">jboss</property> <property name="hibernate.connection.password">jboss</property> <!-- JDBC connection properties (end) --> <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property> <!-- DataSource properties (begin) == <property name="hibernate.connection.datasource">java:/JbpmDS</property> == DataSource properties (end) --> <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property> ...
    4. Note that the following line is commented:
      <property name="hibernate.connection.datasource">java:/JbpmDS</property>
    5. Extract el-api.jar and el-ri.jar from the original war file (jbpm-console.war/WEB-INF/lib) to jbpm-console/WEB-INF/lib
    6. Copy jboss-j2ee.jar and commons-collections.jar to jbpm-console/WEB-INF/lib. You can find these files in jbpm-jpdl-3.2.2/server/server/jbpm/lib
    7. Download mysql jdbc driver from MySQL Home Page and move it to $TOMCAT_HOME/common/lib
    8. Zip jbpm-console to a war file and move it to $TOMCAT_HOME/webapps
  3. Setup a JDBC Realm in Tomcat
    Create a file jbpm-console.xml in /$CATALINA_HOME/conf/Catalina/localhost similar to
<Context> <Realm className="org.apache.catalina.realm.JDBCRealm" driverName="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/jbpm" connectionName="jboss" connectionPassword="jboss" userTable="JBPM_ID_USER u, JBPM_ID_MEMBERSHIP m, JBPM_ID_GROUP g" userNameCol="g.TYPE_ = 'security-role' AND m.GROUP_ = g.ID_ AND m.USER_ = u.ID_ AND u.NAME_" userCredCol="DISTINCT u.PASSWORD_" userRoleTable="JBPM_ID_USER u, JBPM_ID_MEMBERSHIP m, JBPM_ID_GROUP g" roleNameCol="g.NAME_" /> </Context>

Now you should be able to run jBPM default web app in Tomcat.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值