设为首页 收藏本站
查看: 661|回复: 0

[经验分享] jBPM5与Tomcat 6整合

[复制链接]

尚未签到

发表于 2015-8-7 10:48:47 | 显示全部楼层 |阅读模式
  以下介绍jBPM5与Tomcat6, h2 database and Bitronix transaction manager的整合。
  1)从http://sourceforge.net/projects/jbpm/files/jBPM 5/jbpm-5.0-Final/下载 bpm-5.0.0-gwt-console.zip
  解压得到jbpm-gwt-console-server-5.0.0.war,jbpm-gwt-console-5.0.0.war,重新命名 jbpm-console.war and gwt-console-server.war,copy到tomcat6的webapps目录下。
  2)
  创建 users 和 roles in TOMCAT_HOME/conf/tomcat-users.xml.
  例子如下:
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  3)设置 jbpm.console.directory in Catalina.bat (.sh)
  例如:
  -Djbpm.console.directory=C:/jbpm5/CR1/jbpm-installer/sample/evaluation/src/main/resources
  4)复制JBPM_INSTALLER\jboss-4.2.3.GA server\default\data\birt into TOMCAT_HOME\birt. 提供report功能
  5) Copy 数据库驱动 (e.g., h2.jar) and 所有相关的 jar files into TOMCAT_HOME/lib.
  如果你使用其他数据库,例如:Oracle, Mysql , 你需要复制相关 jar files (http://community.jboss.org/thread/161643)
  依赖的lib文件:
  jbpm-persistence-jpa-5.0-CR1.jar
  h2-1.2.124.jar
  persistence-api-1.0.jar
  geronimo-jta_1.0.1B_spec-1.0.1.jar
  geronimo-jms_1.0.1B_spec-1.0.1.jar
  javassist-3.4.GA.jar
  hibernate-entitymanager-3.4.0.GA.jar
  hibernate-core-3.3.0.SP1.jar
  hibernate-commons-annotations-3.1.0.GA.jar
  hibernate-annotations-3.4.0.GA.jar
  ejb3-persistence-1.0.2.GA.jar
  dom4j-1.6.1.jar
  commons-collections-3.1.jar
  antlr-2.7.6.jar
  btm-tomcat55-lifecycle-1.3.3.jar
  slf4j-api-1.5.2.jar
  slf4j-jdk14-1.5.2.jar
  btm-1.3.1.jar
  6)启动数据库
  例如, run ‘ant h2.start’ from JBPM_INSTALLER directory.
  7)启动human task, 例如., run ‘ant start.human.task’ from JBPM_INSTALLER 目录
  你也能整合Human task作为一个启动时加载的Servlet,参见 (http://community.jboss.org/thread/161260)
  8)使用BTM(Bitronix transaction manager)初始化数据源JNDI(jdbc/testDS1)
  (e.g., http://docs.codehaus.org/display/BTM/Tomcat13) 或者用TOMCAT JNDI (http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html) configuration documentation.
  通过Bitronix transaction manager创建一个JNDI的数据源到TOMCAT中,具体步骤如下:
A.首先将以下的jar包复制到%TOMCAT_HOME%\lib的目录下:btm-2.0.1.jar ,jta-1.1.jar , slf4j-api-1.6.0.jar , slf4j-jdk14-1.6.0.jar , btm-tomcat55-lifecycle-2.1.0.jar
B.在 Catalina.bat文件中添加如下信息:
set CATALINA_OPTS=-Dbtm.root=%CATALINA_HOME% -Dbitronix.tm.configuration=%CATALINA_HOME%\conf\btm-config.properties
C.修改%TOMCAT_HOME%\conf中server.xml,在

后添加

D.在%TOMCAT_HOME%\conf目录下,创建btm-config.properties添加:
bitronix.tm.serverId=tomcat-btm-node0
bitronix.tm.journal.disk.logPart1Filename=${btm.root}/work/btm1.tlog
bitronix.tm.journal.disk.logPart2Filename=${btm.root}/work/btm2.tlog
bitronix.tm.resource.configuration=${btm.root}/conf/resources.properties
E.修改%TOMCAT_HOME%\conf中content.xml文件在
WEB-INF/web.xml
后添加


F.在%TOMCAT_HOME%\conf目录下,创建resource. properties 文件添加:
resource.ds1.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
resource.ds1.uniqueName=jdbc/testDS1
resource.ds1.minPoolSize=0
resource.ds1.maxPoolSize=5
resource.ds1.driverProperties.driverClassName=org.h2.jdbcx.JdbcDataSource
G.修改%TOMCAT_HOME%\webapps\gwt-console-server\WEB-INF\classes\META-INF\persistence.xml如下:

  ==========================================
  a.) Create the following btm-config.properties in TOMCAT_HOME/conf





bitronix.tm.serverId=tomcat-btm-node0 bitronix.tm.journal.disk.logPart1Filename=${btm.root}/work/btm1.tlog bitronix.tm.journal.disk.logPart2Filename=${btm.root}/work/btm2.tlog bitronix.tm.resource.configuration=${btm.root}/conf/resources.properties
  b.) Add transaction and Resource information after 'WatchedResource' line in TOMCAT_HOME/conf/context.xml as shown below.
  .........
  ..........
  WEB-INF/web.xml
  
  
  ..........
  .........
  c.) Create 'resource.properties' in TOMCAT_HOME/conf as shown below.
  resource.ds1.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
  resource.ds1.uniqueName=jdbc/testDS1
  resource.ds1.minPoolSize=0
  resource.ds1.maxPoolSize=5
  resource.ds1.driverProperties.driverClassName=org.h2.jdbcx.JdbcDataSource
  d.) Modify TOMCAT_HOME/conf/server.xml to include BTMLifecycleListener after the line that hasGlobalResourcesLifecycleListener as shown below.
  .........
  
  
  ....
  e.) Modify TOMCAT_HOME\webapps\gwt-console-server\WEB-INF\classes\META-INF\persistence.xml to include the Bitronix value for hibernate.transaction.manager_lookup_class as shown below.
  ....
  
  ...
  Login to console http://localhost:8080/jbpm-console (krisv/krisv)
  
  
  原文:http://community.jboss.org/thread/161643
  





jBPM5 console + Oracle + Tomcat6




  Here are the steps:
  
  1.) Configure the jBPM console with Tomcat (http://community.jboss.org/thread/160572?tstart=0) and configure the datasource against the Oracle database.
  
  2.) Copy Oracle driver (e.g. oracle-11.1.0.6.jar) into into TOMCAT_HOME/lib
  
  3.) Modify hibernate.cfg.xml in TOMCAT_HOME\webapps\gwt-console-server\WEB-INF\classes\META-INF to include Oracle connection details.
  
  e.g
  ......
  ......
  
  oracle.jdbc.OracleDriver
  jdbc:oracle:thin:@yourhostname:1521:test
  dbuser
  dbpw
  
  1
  
  org.hibernate.dialect.Oracle10gDialect
  .......
  .......
  
  Following two steps requires repackaging the jar files as the default embedded configuration files use h2. Also, do not use CR1 jar files as a lot of fixes for Oracle were done after CR1 release. Use latest SNAPSHOT jar files.
  
  4.) Download and copy jbpm-human-task-5.0-SNAPSHOT.jar to TOMCAT_HOME/webapps/gwt-console-server/WEB-INF/lib
  
  
  
  5.) Download and copy jbpm-bam-5.0-SNAPSHOT.jar to TOMCAT_HOME/webapps/gwt-console-server/WEB-INF/lib
  
  
  6.) The BAM reports files (process_summary.rptdesign,overall_activity.rptdesign) need to be modified (using Eclispe BIRT plugin) to inlcude Oracle connection details.
  
  7.) Also the Oracle driver needs to be included from BIRT ReportEngine.
  Its location is TOMCAT_HOMEbirt\ReportEngine\plugins\org.eclipse.birt.report.data.oda.jdbc_2.3.2.r232_v20090212\drivers
  
  Step6 is mainly required as the h2 database connection details are included and these should be replace with your Oracle database information.
  
  Also,it should be noted that the design files do not have the latest table information. One of the columns for the table NodeInstanceLog (DATE has been replaced with LOG_DATE) has been changed (http://community.jboss.org/message/571322).
  
  Attached please find the example reports. You need to provide the hostname and connection details.
  
  You can not open these design files with the latest BIRT plugin as these reports use 2.3.1.
  Download the BIRT designer from
  http://archive.eclipse.org/birt/downloads/build.php?build=R-R1-2_3_1-200809221151
  http://archive.eclipse.org/birt/downloads/build.php?build=R-R1-2_3_1-200809221151
  and modify the report files process_summary.rptdesign,overall_activity.rptdesign in TOMCAT_HOME/BIRT directory.
  
  
  
  
  
  原文:http://community.jboss.org/thread/160572?tstart=0
  

jBPM5 Console Integration with Tomcat6
  
  Here are the required steps to get the jBPM5 console running in Tomcat6
  
  
  1.) Copy the console war files provided in JBPM_INSTALLER/lib into Tomcat’s webapps directory
  These war files can also be downloaded from (http://sourceforge.net/projects/jbpm/files/jBPM%205/jbpm-5.0-CR1/jbpm-5.0-CR1-gwt-console.zip/download). This download has two war files jbpm-gwt-console-5.0-CR1.war and jbpm-gwt-console-server-5.0-CR1.war. Rename them to jbpm-console.war and gwt-console-server.war and copy them to TOMCAT_HOME/webapps
  
  2.) Create users and roles in TOMCAT_HOME/conf/tomcat-users.xml.
  Here is an example
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  3.) Set the jbpm.console.directory in Catalina.bat (.sh)
  Here is an example.
  .. -Djbpm.console.directory=C:/jbpm5/CR1/jbpm-installer/sample/evaluation/src/main/resources ..
  
  4.) Copy JBPM_INSTALLER\jboss-4.2.3.GA server\default\data\birt into TOMCAT_HOME\birt. This will provide the reporting functionality
  
  5.) Copy the database driver (e.g., h2.jar) and all the dependant jar files into TOMCAT_HOME/lib.
  
  Here are the required libraries:
  
  jbpm-persistence-jpa-5.0-CR1.jar
  h2-1.2.124.jar
  persistence-api-1.0.jar
  geronimo-jta_1.0.1B_spec-1.0.1.jar
  javassist-3.4.GA.jar
  hibernate-entitymanager-3.4.0.GA.jar
  hibernate-core-3.3.0.SP1.jar
  hibernate-commons-annotations-3.1.0.GA.jar
  hibernate-annotations-3.4.0.GA.jar
  ejb3-persistence-1.0.2.GA.jar
  dom4j-1.6.1.jar
  commons-collections-3.1.jar
  antlr-2.7.6.jar
  
  
  6.) Start database:
  e.g, run ‘ant h2.start’ from JBPM_INSTALLER directory
  
  7.) Start human task, e.g., run ‘ant start.human.task’ from JBPM_INSTALLER directory
  
  
  This assumes that a datasource JNDI (jdbc/testDS1) is configured in Tomcat and a transaction manager (such as Bitronix or JOTM or Atomikos etc) is configured on Tomcat.
  Refer to http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html for JNDI configuration on Tomcat6.
  
  Login to console http://localhost:8080/jbpm-console (krisv/krisv)

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-95115-1-1.html 上篇帖子: Tomcat 6 下篇帖子: Tomcat用户名密码管理
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表