[jboss-user] [jBPM] - Set up JBPM5.4 Final Installer to use MS SQL Server 2008 using JTDS

Thomas Setiabudi do-not-reply at jboss.com
Sat Dec 1 06:14:03 EST 2012


Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the document:

"Set up JBPM5.4 Final Installer to use MS SQL Server 2008 using JTDS"

To view the document, visit: https://community.jboss.org/docs/DOC-47975

--------------------------------------------------------------
* 
 #A_What_I_Am_Going_To_Do A. What I Am Going To Do


* 
 #B_The_Setup_Steps B. The Setup Steps




I have been using JBPM5.3 for some months and then I switch to JBPM5.4. 
After I download JBPM5.4.Final full installer, I thought the DB Set up will be exactly the same with JBPM5.3 full installer  https://community.jboss.org/docs/DOC-19221 https://community.jboss.org/wiki/SetUpJBPM53ToUseMSSQLServer2008
But I realized that some things has changed and at the time when I write this, the guide for changing Database in JBPM5.4 full installer is still outdated  http://docs.jboss.org/jbpm/v5.4/userguide/ch.installer.html#d0e609 http://docs.jboss.org/jbpm/v5.4/userguide/ch.installer.html#d0e609


h1. A. What I Am Going To Do
     1. I will change the Database setting of jbpm5.4 final full installer and point it to use MS SQL Server 2008
     2. The Database driver used is jtds-1.2.4
     3. Although it is possible to have separate database for Task and Process data, in this setup I will use only one Database for all the Task database tables and all the Process database tables.
     4. I do this set up using Windows XP 64 Bit
     5. apache ant version used is Apache Ant 1.8.4
     6. jdk used is jdk 1.6 (set in Windows Environment variable as JAVA_HOME)

h1. B. The Setup Steps
1. JBPM5.4 final full installer comes with almost every needed component, except eclipse (optional). But I want the eclipse, so I download *eclipse-java-helios-SR2-win32-x86_64.zip* and put it into 
*jbpm-installer\lib* folder

2. Because my OS is 64 bit version, I have to do a modification to the *build.xml* file found in *jbpm-installer* folder. So I changed this part 

<!-- Download Eclipse -->
  <condition property="download.type" value="win32">
    <os family="windows" />
  </condition> 


to

<!-- Download Eclipse -->
  <condition property="download.type" value="win32-x86_64">
    <os family="windows" />
  </condition>


3. Now its time to set up the Hibernate settings, mostly we will make changes to the hibernate dialect, lets open *jbpm-installer\db* folder.

4. I am not sure how each file is used here in jbpm5.4 since the official guide still reflect jbpm5.3 files, so here is what I do, I start with opening *jbpm-installer\db*\*jbpm-persistence-JPA1.xml*
I changed:

<properties>
      <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
      <property name="hibernate.max_fetch_depth" value="3"/>



to


<properties>
      <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
      <property name="hibernate.max_fetch_depth" value="3"/>



5. Then I open *jbpm-installer\db*\*jbpm-persistence-JPA2.xml*
I changed:

 <properties>
      <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
      <property name="hibernate.max_fetch_depth" value="3" />



to

 <properties>
      <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect" />
      <property name="hibernate.max_fetch_depth" value="3" />



6. Lets continue, and open *jbpm-installer\db\task-persistence-JPA1.xml*
I changed:

<properties>
      <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
      <property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
      <property name="hibernate.connection.url" value="jdbc:h2:tcp://localhost/runtime/task" />
      <property name="hibernate.connection.username" value="sa"/>
      <property name="hibernate.connection.password" value=""/>



to


<properties>
      <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
      <property name="hibernate.connection.driver_class" value="net.sourceforge.jtds.jdbc.Driver"/>
      <property name="hibernate.connection.url" value="jdbc:jtds:sqlserver://DBName:1433/MyJBPMDB" />
      <property name="hibernate.connection.username" value="myuser"/>
      <property name="hibernate.connection.password" value="mypassword"/>



7. Open *jbpm-installer\db\task-persistence-JPA2.xml*
I changed:

 <properties>
      <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>          
      <property name="hibernate.max_fetch_depth" value="3"/>



to

 <properties>
      <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>          
      <property name="hibernate.max_fetch_depth" value="3"/>
--------------------------------------------------------------

Comment by going to Community
[https://community.jboss.org/docs/DOC-47975]

Create a new document in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121201/1a17e624/attachment.html 


More information about the jboss-user mailing list