jpbm与spring完全整合

一、准备

1.1、安装jdk7并设置好环境变量

1.2 安装oracle 11g,本文以oracle.home代表oracle11g的安装路径,  默认数据库实例orcl。启动oracle数据库,   建立jbpm5.3所需的表空间JBPM,建立两个用户(jbpm5,jbpm5)、(task,task )并授予dba权限 ;

1.3、安装myeclipse10.6,本文以myeclipse.home代表myeclipse的安装路径;

1.4、配置ant1.84:解压apache-ant-1.8.4.zip,本文以 ant.home代表ant的安装路径 ,计算机环境变量系统变量Path增加 ant.home/bin,如“E:\Package\apache-ant-1.8.4\bin”;

1.5、安装jboss, 本文以jboss.home 代表jboss as 7的安装路径;

1.6、解压jbpm-5.3.0.Final-installer-full.zip,本文以install.home 代表jbpm-installer的路径;

 

二、配置

2.1 build.properties配置,改成本机的jboss:修改install.home下的 build.properties:

   jboss.server.version.7=7.1.1.Final

   jboss.home=install.home (示例:jboss.home=E:/Package/jboss-as-7.1.1.Final,注意要用‘/’

2.2 准备数据库Driver,jboss module配置:

  2.2.1 拷贝 oracle.home\jdbc\lib\ojdbc6.jar 到 install.home\db\driver;

  2.2.2 配置driver_jar_module.xml:修改 install.home\db\driver_jar_module.xml :

<module xmlns="urn:jboss:module:1.0" name="com.oracledatabase.oracle">  

<resources>   

   <!-- Insert resources here -->   

   <resource-root path="ojdbc6.jar"/>   

</resources>   

<dependencies>   

   <module name="javax.api"/>   

   <module name="javax.transaction.api"/>   

</dependencies>   

</module>  

2.3 配置persistence.xml:修改 install.home\db\persistence.xml :

   <jta-data-source>java:jboss/OracleDs</jta-data-source>     

    <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>

2.4 配置 standalone.xml:修改install.home\standalone.xml:

           <datasources>

               <datasource jndi-name="java:jboss/OracleDs" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">

                   <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>

                   <driver>oracle</driver>

                   <security>

                      <user-name>jbpm5</user-name>

                      <password>jbpm5</password>

                   </security>

               </datasource>

               <drivers>

                   <driver name="oracle" module="com.oracledatabase.oracle">

                       <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

                   </driver>

               </drivers>

           </datasources>

2.5 配置 install.home\task-service\resources\META-INF\persistence.xml:

   <properties>

     <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>

     <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>

     <property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:orcl" />

     <property name="hibernate.connection.username" value="task"/>

     <property name="hibernate.connection.password" value="task"/>

     <property name="hibernate.connection.autocommit" value="false" />

     <property name="hibernate.max_fetch_depth" value="3"/>

     <property name="hibernate.hbm2ddl.auto" value="create" />

     <property name="hibernate.show_sql" value="false" />

   </properties>

 

2.6 配置build.xml,修改配置mysql为oracle :修改 install.home\build.xml:

<property name="db.driver.jar.name" value="ojdbc6.jar" />

<property name="db.driver.module.prefix" value="com/oracledatabase/oracle"/>

 

三、安装

3.1 安装jbpm runtime:在install.home 新建文件夹runtime,解压install.home\lib\ jbpm-5.3.0.Final-bin.zip到 install.home\runtime ;

3.2 打开cmd,进入  install.home 目录,运行以下命令:

ant install.guvnor.into.jboss
ant install.designer.into.jboss
ant install.jBPM-gwt-console.into.jboss

ant install.demo.db

3.3 在 myeclipse.home\dropins 建立文件夹 GEF,解压install.home\lib\GEF-SDK-3.6.2.zip 到 myeclipse.home\dropins\GEF;

3.4 准备 myeclipse drools 插件:解压 install.home\lib\org.drools.updatesite-5.4.0.Final-assembly.zip,本文以drools.home代表解压路径;

3.5 打开myeclipse 10.6 configuration center, add site  (drools,drools.home ),从本机安装drools-eclipse;

3.6 配置myeclipse jboss-as-7.11,  设置myeclipse sever jboss 7.x serverjboss.home

3.7 配置myeclipse jbpm runtime,设置 myeclipse installed jbpm runtimesinstall.home\runtime;

 

四 运行

4.1  启动oracle数据库, 打开cmd,进入  install.home 目录,运行以下命令:

ant start.jboss

ant start.human.task

4.2 使用 Guvnor repository and Designer,访问:

http://localhost:8080/drools-guvnor

4.3 使用 jBPM Console,访问:

http://localhost:8080/jbpm-console

用户名,密码(krisv, krisv)

你可能感兴趣的:(spring)