<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Set up JBPM5.4 Final Installer to use MS SQL Server 2008 using JTDS
</h3>
<span style="margin-bottom: 10px;">
    modified by <a href="https://community.jboss.org/people/thomas.setiabudi">Thomas Setiabudi</a> in <i>jBPM</i> - <a href="https://community.jboss.org/docs/DOC-47975">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p><div class="toc" style="border: 1px dashed black; padding: 10px;"><ul><li>
<a class="jive-link-anchor-small" href="#A_What_I_Am_Going_To_Do">A. What I Am Going To Do</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#B_The_Setup_Steps">B. The Setup Steps</a>
</li>
</ul></div></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have been using JBPM5.3 for some months and then I switch to JBPM5.4. </p><p><span>After I download JBPM5.4.Final full installer, I thought the DB Set up will be exactly the same with JBPM5.3 full installer </span><a class="jive-link-wiki-small" href="https://community.jboss.org/docs/DOC-19221" target="_blank">https://community.jboss.org/wiki/SetUpJBPM53ToUseMSSQLServer2008</a></p><p><span>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 </span><a class="jive-link-external-small" href="http://docs.jboss.org/jbpm/v5.4/userguide/ch.installer.html#d0e609" target="_blank">http://docs.jboss.org/jbpm/v5.4/userguide/ch.installer.html#d0e609</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h1 id="A_What_I_Am_Going_To_Do">A. What I Am Going To Do</h1><p>&#160;&#160;&#160;&#160; 1. I will change the Database setting of jbpm5.4 final full installer and point it to use MS SQL Server 2008</p><p>&#160;&#160;&#160;&#160; 2. The Database driver used is jtds-1.2.4</p><p>&#160;&#160;&#160;&#160; 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.</p><p>&#160;&#160;&#160;&#160; 4. I do this set up using Windows XP 64 Bit</p><p>&#160;&#160;&#160;&#160; 5. apache ant version used is Apache Ant 1.8.4</p><p>&#160;&#160;&#160;&#160; 6. jdk used is jdk 1.6 (set in Windows Environment variable as JAVA_HOME)</p><p>&#160;&#160;&#160;&#160; 7. I use 7-zip to help me modify files inside a .war file</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h1 id="B_The_Setup_Steps">B. The Setup Steps</h1><p>1. JBPM5.4 final full installer comes with almost every needed component, except eclipse (optional). But I want the eclipse, so I download <strong>eclipse-java-helios-SR2-win32-x86_64.zip</strong> and put it into </p><p>&#160;&#160;&#160;&#160; <strong>jbpm-installer\lib</strong> folder</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>2. Because my OS is 64 bit version, I have to do a modification to the <strong>build.xml</strong> file found in <strong>jbpm-installer</strong> folder. So I changed this part </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-comment">&lt;!-- Download Eclipse --&gt;</span>
&#160; <span class="jive-xml-tag">&lt;condition property="download.type" value="win32"&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;os family="windows" /&gt;</span>
&#160; <span class="jive-xml-tag">&lt;/condition&gt;</span> 
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>to</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-comment">&lt;!-- Download Eclipse --&gt;</span>
&#160; <span class="jive-xml-tag">&lt;condition property="download.type" value="win32-x86_64"&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;os family="windows" /&gt;</span>
&#160; <span class="jive-xml-tag">&lt;/condition&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>3. Now its time to set up the Hibernate settings, mostly we will make changes to the hibernate dialect, lets open <strong>jbpm-installer\db </strong>folder.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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 <strong>jbpm-installer\db</strong>\<strong>jbpm-persistence-JPA1.xml</strong></p><p>I changed:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3"/&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>to</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3"/&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>5. Then I open <strong>jbpm-installer\db</strong>\<strong>jbpm-persistence-JPA2.xml</strong></p><p>I changed:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"> <span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" /&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3" /&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>to</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"> <span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect" /&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3" /&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>6. Lets continue, and open <strong>jbpm-installer\db\task-persistence-JPA1.xml</strong></p><p>I changed:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.driver_class" value="org.h2.Driver"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.url" value="jdbc:h2:tcp://localhost/runtime/task" /&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.username" value="sa"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.password" value=""/&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>to</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.driver_class" value="net.sourceforge.jtds.jdbc.Driver"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.url" value="jdbc:jtds:sqlserver://DBName:1433/MyJBPMDB" /&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.username" value="myuser"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.password" value="mypassword"/&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>7. Open <strong>jbpm-installer\db\task-persistence-JPA2.xml</strong></p><p>I changed:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"> <span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/&gt;</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3"/&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>to</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"> <span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/&gt;</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3"/&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>8. Lets navigate to other file in other folder, lets open <strong>jbpm-installer\task-service\resources\META-INF\persistence.xml</strong></p><p>I changed:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.driver_class" value="org.h2.Driver"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.url" value="jdbc:h2:tcp://localhost/runtime/task" /&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.username" value="sa"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.password" value=""/&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>to</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.driver_class" value="net.sourceforge.jtds.jdbc.Driver"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.url" value="jdbc:jtds:sqlserver://DBName:1433/MyJBPMDB" /&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.username" value="myuser"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.password" value="mypassword"/&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>9. Ok, lets dig into .war files in the lib folder, (I use 7-zip to help me modify files inside .war files), lets open <strong>jbpm-installer\lib</strong> folder</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>10. Open <strong>jbpm-installer\lib\jbpm-gwt-console-server-5.4.0.Final-EE6.war\WEB-INF\classes\META-INF\persistence.xml</strong></p><p>I changed:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" /&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3" /&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>to</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect" /&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3" /&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>11. Next, Open <strong>jbpm-installer\lib\jbpm-human-task-war-5.4.0.Final-EE6.war\WEB-INF\classes\META-INF\persistence.xml</strong></p><p>I changed:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/&gt;</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3"/&gt;</span>

</code></pre><p>to</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/&gt;</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3"/&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>12. Allright, seems like we are done changing dialects, lets provide our jtds jar. put <strong>jtds-1.2.4.jar</strong> into <strong>jbpm-installer\db\driver </strong>folder</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>13. next, we need to provide an xml file that will be used by jboss AS to recognize our jtds later, so <strong>Create </strong>a file called <strong>sqlserver_module.xml</strong> and put it in <strong>jbpm-installer\db</strong> folder</p><p>The file content is:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;module xmlns="urn:jboss:module:1.0" name="net.sourceforge.jtds"&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;resources&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;resource-root path="jtds-1.2.4.jar"/&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;/resources&gt;</span>

&#160;&#160; <span class="jive-xml-tag">&lt;dependencies&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;module name="javax.api"/&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;module name="javax.transaction.api"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/dependencies&gt;</span>
<span class="jive-xml-tag">&lt;/module&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>14. Wondered how the ant build will recognize our sqlserver_module.xml later? Happens to me too at first, lets open<strong> jbpm-installer\build.properties</strong> file</p><p>Look at this section:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"># data base related properties
db.driver.jar=${install.home}/db/driver/${db.driver.jar.name}
db.driver.module.dir=${jboss.home}/modules/${db.driver.module.prefix}/main/
# default is H2
db.name=h2
db.driver.jar.name=${db.name}.jar
db.driver.download.url=http://repo1.maven.org/maven2/com/h2database/h2/${H2.version}/h2-${H2.version}.jar
#other options are mysql
#&#160; db.name=mysql
#&#160; db.driver.module.prefix=com/mysql
#&#160; db.driver.jar.name=${db.name}-connector-java.jar
#&#160; db.driver.download.url=https://repository.jboss.org/nexus/service/local/repositories/central/content/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar
#postresql
#&#160; db.name=postresql
#&#160; db.driver.module.prefix=org/postgresql
#&#160; db.driver.jar.name=${db.name}-jdbc.jar
#&#160; db.driver.download.url=https://repository.jboss.org/nexus/content/repositories/thirdparty-uploads/postgresql/postgresql/9.1-902.jdbc4/postgresql-9.1-902.jdbc4.jar

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>lets comment out the h2 setting and make our own sqlserver setting like this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"># data base related properties
db.driver.jar=${install.home}/db/driver/${db.driver.jar.name}
db.driver.module.dir=${jboss.home}/modules/${db.driver.module.prefix}/main/
# default is H2
#db.name=h2
#db.driver.jar.name=${db.name}.jar
#db.driver.download.url=http://repo1.maven.org/maven2/com/h2database/h2/${H2.version}/h2-${H2.version}.jar
#other options are mysql
#&#160; db.name=mysql
#&#160; db.driver.module.prefix=com/mysql
#&#160; db.driver.jar.name=${db.name}-connector-java.jar
#&#160; db.driver.download.url=https://repository.jboss.org/nexus/service/local/repositories/central/content/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar
#postresql
#&#160; db.name=postresql
#&#160; db.driver.module.prefix=org/postgresql
#&#160; db.driver.jar.name=${db.name}-jdbc.jar
#&#160; db.driver.download.url=https://repository.jboss.org/nexus/content/repositories/thirdparty-uploads/postgresql/postgresql/9.1-902.jdbc4/postgresql-9.1-902.jdbc4.jar
#sqlserver
db.name=sqlserver
db.driver.module.prefix=net/sourceforge/jtds
db.driver.jar.name=jtds-1.2.4.jar

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>because or db.name is sqlserver, our sqlserver_module.xml will be recognized by the ant build later on.</p><p>If you really want to know the reason, open <strong>jbpm-installer\build.xml</strong> and look at this section</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml">&#160;&#160;&#160; <span class="jive-xml-tag">&lt;copy file="db/${db.name}_module.xml" tofile="${db.driver.module.dir}/module.xml" /&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>15. ok, now lets deal with the jboss AS 7 standalone setting, open <strong>jbpm-installer\standalone.xml</strong></p><p>we need to do two things here, modify data source and make jboss as recognize our jtds driver, so change this section:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;datasource jta="true" jndi-name="java:jboss/datasources/jbpmDS" pool-name="H2DS" enabled="true" use-java-context="true" use-ccm="true"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;connection-url&gt;</span>jdbc:h2:~/jbpm<span class="jive-xml-tag">&lt;/connection-url&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;driver&gt;</span>h2<span class="jive-xml-tag">&lt;/driver&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;pool&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;min-pool-size&gt;</span>1<span class="jive-xml-tag">&lt;/min-pool-size&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;max-pool-size&gt;</span>4<span class="jive-xml-tag">&lt;/max-pool-size&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;prefill&gt;</span>false<span class="jive-xml-tag">&lt;/prefill&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;use-strict-min&gt;</span>false<span class="jive-xml-tag">&lt;/use-strict-min&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;flush-strategy&gt;</span>FailingConnectionOnly<span class="jive-xml-tag">&lt;/flush-strategy&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/pool&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;user-name&gt;</span>sa<span class="jive-xml-tag">&lt;/user-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;validation&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;check-valid-connection-sql&gt;</span>SELECT 1<span class="jive-xml-tag">&lt;/check-valid-connection-sql&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;validate-on-match&gt;</span>false<span class="jive-xml-tag">&lt;/validate-on-match&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;background-validation&gt;</span>false<span class="jive-xml-tag">&lt;/background-validation&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/validation&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/datasource&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;drivers&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;driver name="h2" module="com.h2database.h2"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xa-datasource-class&gt;</span>org.h2.jdbcx.JdbcDataSource<span class="jive-xml-tag">&lt;/xa-datasource-class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/driver&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/drivers&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>to</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;datasource jndi-name="java:jboss/datasources/jbpmDS" pool-name="H2DS" enabled="true" jta="true" use-java-context="true" use-ccm="true"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;connection-url&gt;</span>jdbc:jtds:sqlserver://DBName:1433/MyJBPMDB<span class="jive-xml-tag">&lt;/connection-url&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;driver&gt;</span>JTDS<span class="jive-xml-tag">&lt;/driver&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;pool&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;min-pool-size&gt;</span>1<span class="jive-xml-tag">&lt;/min-pool-size&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;max-pool-size&gt;</span>4<span class="jive-xml-tag">&lt;/max-pool-size&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;prefill&gt;</span>false<span class="jive-xml-tag">&lt;/prefill&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;use-strict-min&gt;</span>false<span class="jive-xml-tag">&lt;/use-strict-min&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;flush-strategy&gt;</span>FailingConnectionOnly<span class="jive-xml-tag">&lt;/flush-strategy&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/pool&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;user-name&gt;</span>myuser<span class="jive-xml-tag">&lt;/user-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;password&gt;</span>mypassword<span class="jive-xml-tag">&lt;/password&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;validation&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;check-valid-connection-sql&gt;</span>SELECT 1<span class="jive-xml-tag">&lt;/check-valid-connection-sql&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;validate-on-match&gt;</span>false<span class="jive-xml-tag">&lt;/validate-on-match&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;background-validation&gt;</span>false<span class="jive-xml-tag">&lt;/background-validation&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/validation&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/datasource&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;drivers&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;driver name="JTDS" module="net.sourceforge.jtds"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;driver-class&gt;</span>net.sourceforge.jtds.jdbc.Driver<span class="jive-xml-tag">&lt;/driver-class&gt;</span>&#160; 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/driver&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;driver name="h2" module="com.h2database.h2"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xa-datasource-class&gt;</span>org.h2.jdbcx.JdbcDataSource<span class="jive-xml-tag">&lt;/xa-datasource-class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/driver&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/drivers&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>16. Phew, quite a lot files that we have configured. at this point you may want to copy and backup the whole <strong>jbpm-installer</strong> folder, just in case you missed some configuration and caused error in the installation process later, who knows, things like that can happen, so just to be safe...</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="https://community.jboss.org/docs/DOC-47975">going to Community</a></p>

        <p style="margin: 0;">Create a new document in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>