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

[经验分享] tomcat+mysql+jbpm配置工作流(摘)

[复制链接]

尚未签到

发表于 2015-8-10 12:26:05 | 显示全部楼层 |阅读模式
环境:
JDK142
tomcat 5.0
mysql 5.0.16
apache-ant-1.6.5
jbpm-starters-kit-3.1.4
一、解压缩jdpm-starters-kit-3.1.4,标识为:JBPM_HOME
       在mysql数据库中建库”jbpm“,在%JBPM_HOME%/lib下,建立mysql文件夹,将mysql驱动程序拷贝到mysql文件夹下。
二、为ant创建jbpm相关数据库修改相关配置文件  
1     、 %JBPM_HOME%\src\resources\mysql下,创建create.db.hibernate.properties,将“hsqldb ” 目录改名为 “mysql”   ,并修改  create.db.hibernate.properties文件,内容如下:
         
  

  1   # these properties are used by the build script to create
2 # a hypersonic database in the build/  db directory that contains
3   # the jbpm tables and a process deployed in there
4 hibernate.dialect=  org.hibernate.dialect.MySQLDialect
5 hibernate.connection.driver_class=  com.mysql.jdbc.Driver
6 hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm  
   7 hibernate.connection.username=  root
8 hibernate.connection.password=  
   9 hibernate.show_sql=true    2 、修改 %JBPM_HOME%\build.deploy.xml 文件中 “target” 为 “create.db”  的內容,删除 “db.start” , “db.stop” ,将所有的 “hsqldb” 替换为   “mysql”
内容如下:   

  

   1   
    3        
  4        
  5        
  6      
    7         
    8      
    9     
   10     三、为 ant 创建 jbpm.war 包修改相关配置文件   
1   、修改 %JBPM_HOME%\src\config.files\hibernate.cfg.xml   文件中数据库连接配置部分,内容如下:  

   1   ……
  2      
    3     org.hibernate.dialect.MySQLDialect  
    4     com.mysql.jdbc.Driver  
    5     jdbc:mysql://localhost:3306/jbpm  
    6     root  
    7     rootrootrootroot  
    8      
    9     true  
   10       ……
11    2 、创建/修改 %JBPM_HOME%\src\resources\jbpm.sar\jbpm.properties ,内容如下:    

   1 jbpm.scheduler.service.factory=  org.jbpm.scheduler.impl.SchedulerServiceImpl
  2 jbpm.task.instance.class=  org.jbpm.taskmgmt.exe.TaskInstance
  3 # uncomment the next line if   JbpmSessionFactory.getInstance()
  4   # should lookup the singleton instance from JNDI instead of creating
  5 # a default   one.
  6   #
  7 # jbpm.session.factory.jndi.name=java:/jbpm/  JbpmSessionFactory
  8 # uncomment the next line to use the file system instead of the database for   
  9   # storing files related to a process definition
10   #
11 # jbpm.files.dir=c:/  jbpm.data
12   # resource path to a properties file that will overwrite all the hibernate
13   # properties. For database specific builds in db project there is a different
14 # hibernate.properties file on the classpath for   each database. You could change
15 # the default database for   any testing runs by uncommenting the next line and
16   # adding a hibernate.properties file in the basedir.
17   #
18 jbpm.hibernate.cfg.xml=  jbpm.hibernate.cfg.xml
19 # jbpm.hibernate.properties=  jbpm.hibernate.properties
20   
  3 、修改 %JBPM_HOME%\src\resources\jbpm.sar\jbpm.hibernate.properties ,只用 hibernate.cfg.xml 来配置 hibernate ,因此全部注释掉,内容如下:   
  

  

  1 # hibernate.dialect=  org.hibernate.dialect.HSQLDialect
2 # hibernate.connection.datasource=java:/  DefaultDS
3 # hibernate.show_sql=true    4 、修改 %JBPM_HOME%\build.deploy.xml 文件, “target” 为 “build.webapp” 的內容,原文件相关的 jar 包未包含全,因此补全,内容如下:
   

   1   
    2      
    3      
    4      
    5         
    6      
    7      
    8         
    9         
   10         
   11         
   12         
   13         
   14         
   15         
   16      
   17      
   18         
   19        
20     
   21   
  四、执行   Ant
1 、创建并初始化 jbpm 例子所需的   table
  


  1 ant create.db -buildfile build.deploy.xml  

2  、生成   jbpm.war  


  1 ant build.webapp -buildfile build.deploy.xm

运维网声明 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-96973-1-1.html 上篇帖子: Hibernate缓存 Memcached介绍集群及tomcat的配置 下篇帖子: Tomcat6.0配置(虚拟目录的设置+多域名绑定) 和tomcat 7 (转)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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

扫描微信二维码查看详情

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


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


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


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



合作伙伴: 青云cloud

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