JBPM with SQLServer database
1. Source code: First go to the master station (http://www.jboss.com/products/jbpm/downloads) to download JBPM source code (JBPM-3.1.1.zip), or synchronize code from CVS, I adopted the JBPM-3.1.1 version.
2. Application Server: I adopted JBoss4.04, JDK1.5
3. Database: Used is the MSSQL Server2000, start the enterprise manager, build a library, such as: JBPMTEST.
4. Item Configuration: Pack the downloaded source code ZIP packet, import JBPM-3.1.1 source code in Eclipse.
5. Modify the configuration file:
l New folders for storing database-related configurations. Create a new folder under src / Resources: such as MSSQL.
l Copy file: Copy the two files of HSQLDB under the directory to copy to the new folder.
l Modify the file:
a) create.db.hibernate.properties. This file is mainly configured by database connection properties, such as:
Hibernate.diaforct = org.hibernate.diaalect.sqlserverdiaforct
Hibernate.connection.driver_class =
Net.SourceForge.jtds.jdbc.driver
Hibernate.Connection.url = JDBC: JTDS: SQLSERVER: // localhost: 1433 / jbpmtest
Hibernate.Connection.userName = SA
Hibernate.connection.password = 123456
Hibernate.show_sql = TRUE
b) src / config.files / hibernate.cfg.xml. This file is mainly configured by the system runtime database connection property, such as:
c) Build.Deploy.xml under the root directory.
Find the create.db node and modify:
Cfg = "$ {basedir} /src/config.files/hibernate.cfg.xml" Properties = "$ {Basedir} /src/resources/mssql/create.db.hibernate.properties" /> Cfg = "$ {basedir} /src/config.files/hibernate.cfg.xml" Properties = "$ {Basedir} /src/resources/mssql/create.db.hibernate.properties" /> Properties = "$ {Basedir} /src/resources/mssql/create.db.hibernate.properties"> deployprocess> target> Find deploy.processes nodes Properties = "$ {Basedir} /src/resources/mssql/create.db.hibernate.properties"> deployprocess> target> 6. Put the SQLServer driver in the lib directory in the root directory 7. Modify the build.properties file under the root, mainly the location of JBoss 8. Run Ant to generate the necessary database tables and library files. Run the ANT builder, you can see the log information in the console, you can see information. The generated JAR file is in the rooted build directory. If you have no modification, there may be error messages, View reasons for logs 9. Copy several JAR packages to jbpm.war / web -inf / lib / directory for jbpm.war, you also need to copy other library files to this directory (including JDBC drivers, etc.). Specific reference items LIB package under the root directory. Note: If you deploy it to JBoss, you can copy jbpm.war.dir and then renamed to jbpm.war 10. end Note: Other database methods are the same, as long as it is the database supported by Hibernate, it can be. If you use Ant to build again, you will be best to remove your first built.