<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 193,  comments - 520,  trackbacks - 0

    1. 從 http://www.jboss.com/products/jbpm/downloads 下載 jbpm-3.0.zip

    2. 解壓縮 jbpm-3.0.zip 到 'temp' 目錄

    3. 使用 eclipse, 將 'temp\jbpm-3.0' 作為 an existing project into workspace 導(dǎo)入

    配置連接 MySQL

    1. 在 'jbpm-3.0\lib' 目錄下 創(chuàng)建 'mysql' 目錄

    2. 將 mysql數(shù)據(jù)庫(kù)驅(qū)動(dòng) (mysql-connector-java-3.1.7-bin.jar) 拷貝到 'mysql' 目錄

    3. 在 mysql 中創(chuàng)建一個(gè)數(shù)據(jù)庫(kù),數(shù)據(jù)庫(kù)名字

    4. 在 'jbpm-3.0\src\resources'目錄下創(chuàng)建 'mysql' 目錄

    5. 把兩個(gè)配置文件 (create.db.hibernate.properties, identity.db.xml) 從 'hsqldb' 目錄下 拷貝到 'mysql' 目錄

    6. 按下面所示編輯 'create.db.hibernate.properties' 文件: hibernate.dialect=org.hibernate.dialect.MySQLDialect

    hibernate.connection.driver_class=com.mysql.jdbc.Driver

    hibernate.connection.url=jdbc:mysql://localhost:3306/

    hibernate.connection.username= hibernate.connection.password=

    hibernate.show_sql=true hibernate.query.substitutions=true 1, false 0

    hibernate.c3p0.min_size=1 hibernate.c3p0.max_size=3

    7. 另一個(gè)文件 'identity.db.xml'不做改動(dòng)

    8. 在 'jbpm-3.0' 根目錄, 編輯ANT的腳本 'build.deploy.xml' 找到 target name="create.db", 刪除 db.start, db.stop 在這個(gè)目標(biāo)塊中將所有的'hsqldb' 替換為 'mysql'

    9. 運(yùn)行ANT ant create.db -buildfile build.deploy.xml 運(yùn)行完畢后就會(huì)發(fā)現(xiàn)mysql中多出很多表,這是jbpm保持狀態(tài)用的

    創(chuàng)建 jbpm.war 使其在tomcat中運(yùn)行

    默認(rèn)的打war包時(shí),掉了一些庫(kù)文件

    1. 在 eclipse中, 編輯ant腳本 'build.deploy.xml' 在目標(biāo)塊 target name="build.webapp" 中在

    <copy todir="build/jbpm.war.dir/WEB-INF/lib"> 下將

    <fileset dir="build" includes="jbpm-webapp-${jbpm.version}.jar" /> 替換為

    <fileset dir="build" includes="jbpm*.jar" />

     另外加入新的兩行

    <fileset dir="lib/hibernate" includes="*.jar" />
    <fileset dir="lib/bsh" includes="*.jar" />

    2.因?yàn)?Hibernate 不能將它的SessionFactory與tomcat的jndi 綁定 , 我們直接在源碼中修改

    3. 打開源文件 JbpmSessionFactory.java, 在 getInstance() 方法里, 刪除下面代碼

    InitialContext initialContext = new InitialContext(); Object o = initialContext.lookup(jndiName);

    將下面這行

    instance = (JbpmSessionFactory) PortableRemoteObject.narrow
    (o, JbpmSessionFactory.class);

    替換為 instance = (JbpmSessionFactory) PortableRemoteObject.narrow
    (new JbpmSessionFactory(createConfiguration()), JbpmSessionFactory.class);

    4.在 createConfiguration(String configResource) 方法里, 注釋掉這段代碼

    String hibernatePropertiesResource = JbpmConfiguration.getString("jbpm.hibernate.properties");

    if (hibernatePropertiesResource!=null) { Properties hibernateProperties =
    new Properties();

    try { hibernateProperties.load( ClassLoaderUtil.getStream(hibernatePropertiesResource) ); }

    catch (IOException e) {
          e.printStackTrace();
          throw new RuntimeException
       ("couldn't load the hibernate properties from resource      '"hibernatePropertiesResource"'", e);
    }
    log.debug("overriding hibernate properties with "+ hibernateProperties); configuration.setProperties(hibernateProperties);
    }
    同時(shí)加入下面的代碼

    configuration.setProperty("hibernate.dialect", "org.hibernate.dialect.MySQLDialect");

    configuration.setProperty("hibernate.connection.driver_class", "com.mysql.jdbc.Driver");

    configuration.setProperty("hibernate.connection.url", "jdbc:mysql://localhost:3306/";);

    configuration.setProperty("hibernate.connection.username", "");

    configuration.setProperty("hibernate.connection.password", "");

    configuration.setProperty("hibernate.connection.pool_size", "15");

    5. 運(yùn)行腳本命令 ant build ant build.webapp -buildfile build.deploy.xml

    6. 將jbpm.war 從 'jbpm-3.0\build' 下拷貝到 'tomcat.home\webapps'

    7. 啟動(dòng) tomcat

    8. 打開瀏覽器 'http://localhost:8080/jbpm'



    http://m.tkk7.com/ronghao 榮浩原創(chuàng),轉(zhuǎn)載請(qǐng)注明出處:)
    posted on 2005-11-10 17:31 ronghao 閱讀(3420) 評(píng)論(5)  編輯  收藏 所屬分類: 工作日志

    FeedBack:
    # re: 在Tomcat中配置運(yùn)行jbpm自帶的websale
    2005-11-16 14:51 | 孫茂成
    我的公司msn:smc@rjgrid.com.cn
    私人msn:thunderbird.smc@homtamil.com
    我的信箱:thunderbird.smc@gmail.com

    很高興看到你的博客,我正在讀jbpm源碼手上也有個(gè)比較大的項(xiàng)目,希望能和你交流
      回復(fù)  更多評(píng)論
      
    # re: 在Tomcat中配置運(yùn)行jbpm自帶的websale
    2005-11-16 18:04 | ronghao
    我也是剛剛對(duì)jbpm看了看源碼,還沒在實(shí)際項(xiàng)目中運(yùn)用過,多交流吧  回復(fù)  更多評(píng)論
      
    # re: 在Tomcat中配置運(yùn)行jbpm自帶的websale
    2005-11-18 17:37 | 路人甲
    首先十分大哥的這篇文章,小弟是剛剛接觸工作流,很多地方都不懂,看完這篇文章后實(shí)在受益非淺.
    另我在實(shí)際操作中有幾處與上文有出入
    hibernate.connection.url=jdbc:mysql://localhost:3306/jbpmtest
    這里不指定database的話好像會(huì)找不到數(shù)據(jù)庫(kù)吧?
    configuration.setProperty("hibernate.connection.url", "jdbc:mysql://localhost:3306/jbpmtest");
    configuration.setProperty("hibernate.connection.username", "root");
    <fileset dir="lib/mysql" includes="*.jar" />
    數(shù)據(jù)庫(kù)驅(qū)動(dòng)



      回復(fù)  更多評(píng)論
      
    # re: 在Tomcat中配置運(yùn)行jbpm自帶的websale
    2006-04-06 17:53 | dawn
    我按照上邊的方法打好war后發(fā)布時(shí)jsp頁(yè)面顯示,requested resource is not available。
    而且當(dāng)把jbpm.war copy到webapps目錄下后,啟動(dòng)tomcat時(shí)會(huì)報(bào)好長(zhǎng)的錯(cuò):嚴(yán)重parse Error …… Document is in invalid: no grammer found. org.xml.sax.SAXParseException。

    請(qǐng)問這是怎么回事呢?  回復(fù)  更多評(píng)論
      
    # re: 在Tomcat中配置運(yùn)行jbpm自帶的websale
    2006-08-17 09:17 | hou
    我按要求把jbpm放在tomcat下運(yùn)行時(shí)產(chǎn)生錯(cuò)誤,嚴(yán)重Error ListenerStart,
    在build.properties配置好Jboss之后,運(yùn)行jbpm-server下的start.bat不出錯(cuò),就是有的時(shí)候數(shù)據(jù)庫(kù)的表沒了,怎么回事?
    msn:houzz_101@hotmail.com  回復(fù)  更多評(píng)論
      
    <2005年11月>
    303112345
    6789101112
    13141516171819
    20212223242526
    27282930123
    45678910

    關(guān)注工作流和企業(yè)業(yè)務(wù)流程改進(jìn)。現(xiàn)就職于ThoughtWorks。新浪微博:http://weibo.com/ronghao100

    常用鏈接

    留言簿(38)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    常去的網(wǎng)站

    搜索

    •  

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 亚洲国产精品尤物yw在线| 国产v亚洲v天堂a无| 亚洲精品亚洲人成在线麻豆| 亚洲精华液一二三产区| 久久综合国产乱子伦精品免费| 麻豆精品国产免费观看| 中文字幕亚洲免费无线观看日本 | 亚洲一卡2卡三卡4卡有限公司| 免费大片av手机看片| 无码少妇一区二区浪潮免费| 亚洲s色大片在线观看| 欧亚一级毛片免费看| 亚洲精品免费在线观看| 日韩午夜理论免费TV影院| 亚洲日韩中文字幕一区| 成年午夜视频免费观看视频| 亚洲性一级理论片在线观看| 国产精彩免费视频| 亚洲国产精品专区| 永久免费AV无码国产网站| 中文字幕在线成人免费看| 中国亚洲女人69内射少妇| 在线播放免费人成视频网站 | 亚洲大片免费观看| 亚洲日韩在线第一页| 国产高清对白在线观看免费91| 亚洲人成人无码网www国产| 岛国精品一区免费视频在线观看 | 国产激情免费视频在线观看| 国产亚洲精久久久久久无码| 182tv免费视频在线观看| 亚洲高清视频在线观看| 国产免费女女脚奴视频网| 精品无码一级毛片免费视频观看 | 热99re久久免费视精品频软件| 免费国产成人α片| 亚洲天堂2016| 亚洲免费在线视频| 国产精品亚洲成在人线| 亚洲AV成人精品日韩一区18p| 中文字幕视频免费在线观看|