[jbpm-commits] JBoss JBPM SVN: r4398 - in jbpm3/trunk: hudson and 35 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Apr 2 18:50:29 EDT 2009


Author: alex.guizar at jboss.com
Date: 2009-04-02 18:50:29 -0400 (Thu, 02 Apr 2009)
New Revision: 4398

Added:
   jbpm3/trunk/modules/core/src/main/resources/jbpm-oracle-ds.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Join.lock.hbm.xml
   jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/
   jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/EsbActionHandler.java
   jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/JBPM2094Test.java
   jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/
   jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml
   jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml
   jbpm3/trunk/modules/db/src/main/resources/oracle.properties
Removed:
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/jpdl/xml/jpdl-3.3.xsd
   jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/EsbActionHandler.java
   jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/JBPM2094Test.java
   jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml
   jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml
Modified:
   jbpm3/trunk/hudson/hudson-home/command.sh
   jbpm3/trunk/hudson/hudson-home/jobs/jBPM3-Container-Matrix/config.xml
   jbpm3/trunk/hudson/hudson-home/jobs/jBPM3-Database-Matrix/config.xml
   jbpm3/trunk/hudson/profiles.xml.local.qa
   jbpm3/trunk/modules/core/pom.xml
   jbpm3/trunk/modules/core/src/main/resources/hibernate.properties.oracle.xml
   jbpm3/trunk/modules/core/src/main/resources/jbpm-mysql-ds.xml
   jbpm3/trunk/modules/core/src/main/resources/jbpm-postgresql-ds.xml
   jbpm3/trunk/modules/core/src/main/resources/jbpm-sybase-ds.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/log/VariableLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/def/Action.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ActionLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ActionLog.sybase.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/NodeLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ProcessStateLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/SignalLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TokenCreateLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TokenEndLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TransitionLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Decision.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Fork.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Join.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/instantiation/Delegation.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/ExecuteActionJob.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/ExecuteNodeJob.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Job.sybase.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Timer.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/logging/log/ProcessLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/scheduler/def/CreateTimerAction.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/Swimlane.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/Task.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/TaskController.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml
   jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/log/TaskLog.hbm.xml
   jbpm3/trunk/modules/core/src/test/java/org/jbpm/graph/node/JoinDbTest.java
   jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm983/JBPM983Test.java
   jbpm3/trunk/modules/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java
   jbpm3/trunk/modules/core/src/test/resources/log4j.xml
   jbpm3/trunk/modules/db/pom.xml
   jbpm3/trunk/modules/db/scripts/antrun-jbpmschema.xml
   jbpm3/trunk/modules/db/src/main/resources/postgresql.properties
   jbpm3/trunk/modules/db/src/main/resources/sybase.properties
   jbpm3/trunk/modules/distribution/pom.xml
   jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml
   jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
   jbpm3/trunk/modules/distribution/src/main/resources/installer/user-input-spec.xml
   jbpm3/trunk/modules/enterprise/pom.xml
   jbpm3/trunk/modules/userguide/pom.xml
   jbpm3/trunk/pom.xml
Log:
merge r4346:4349, r4351:4371 from branch 3.2.5.SP

Modified: jbpm3/trunk/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/trunk/hudson/hudson-home/command.sh	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/hudson/hudson-home/command.sh	2009-04-02 22:50:29 UTC (rev 4398)
@@ -12,15 +12,15 @@
 case "$CONTAINER" in
   jboss422*)
     JBOSS_BUILD=jboss-4.2.2.GA
-  ;;
+    ;;
 
   jboss423*)
     JBOSS_BUILD=jboss-4.2.3.GA
-  ;;
+    ;;
 
   jboss500*)
     JBOSS_BUILD=jboss-5.0.0.GA
-  ;;
+    ;;
 esac
 
 #
@@ -44,7 +44,7 @@
 fi
 
 #
-# build the tests
+# Build the tests
 #
 MVN_CMD="mvn -o $ENVIRONMENT process-test-classes"
 echo $MVN_CMD; $MVN_CMD 2>&1; MVN_STATUS=$?
@@ -67,16 +67,22 @@
 cp $JBOSS_HOME/docs/examples/jbpm/jbpm-$DATABASE-ds.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-$DATABASE-ds.xml
 cp $JBOSS_HOME/docs/examples/jbpm/hibernate.cfg.$DATABASE.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
 
-# FIXME: find out whether jTDS can be made to work with XA data source
-# https://jira.jboss.org/jira/browse/JBPM-1818
+# Install Sybase JDBC driver manually, as the distribution cannot contain it
 SYBASE_JDBC_DRIVER=~/.m2/repository/com/sybase/jconnect/6.0.5/jconnect-6.0.5.jar
 if [ -f $SYBASE_JDBC_DRIVER ]; then
   echo "cp $SYBASE_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
   cp $SYBASE_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar
 fi
 
+# Install Oracle JDBC driver manually, as the distribution cannot contain it
+ORACLE_JDBC_DRIVER=~/.m2/repository/com/oracle/ojdbc14/10.2.0.4/ojdbc14-10.2.0.4.jar
+if [ -f $ORACLE_JDBC_DRIVER ]; then
+  echo "cp $ORACLE_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
+  cp $ORACLE_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar
+fi
+
 #
-# start jbossas
+# Start JBoss AS
 #
 $JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_HOME start $JBOSS_BINDADDR
 
@@ -89,13 +95,13 @@
 fi
 
 #
-# log dependency tree
+# Log dependency tree
 #
 MVN_CMD="mvn -o $ENVIRONMENT dependency:tree"
 echo $MVN_CMD; $MVN_CMD | tee $WORKSPACE/dependency-tree.txt
 
 #
-# execute tests
+# Execute tests
 #
 MVN_CMD="mvn -o -fae $ENVIRONMENT test"
 echo $MVN_CMD; $MVN_CMD 2>&1 | tee $WORKSPACE/tests.log
@@ -103,7 +109,7 @@
 cat $WORKSPACE/fixme.txt | egrep "\[\S*]" > $WORKSPACE/errata-$CONTAINER.txt || :
 
 #
-# stop jbossas
+# Stop JBoss AS
 #
 $JBPMDIR/hudson/jboss/bin/jboss.sh $JBOSS_HOME stop
 cp $JBOSS_HOME/server/$JBOSS_SERVER/log/boot.log $WORKSPACE/jboss-boot.log

Modified: jbpm3/trunk/hudson/hudson-home/jobs/jBPM3-Container-Matrix/config.xml
===================================================================
--- jbpm3/trunk/hudson/hudson-home/jobs/jBPM3-Container-Matrix/config.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/hudson/hudson-home/jobs/jBPM3-Container-Matrix/config.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -41,8 +41,8 @@
     <axis>
       <name>database</name>
       <values>
-        <string>hsqldb</string>
-        <string>mysql</string>
+        <string>sybase</string>
+        <string>oracle</string>
       </values>
     </axis>
     <axis>

Modified: jbpm3/trunk/hudson/hudson-home/jobs/jBPM3-Database-Matrix/config.xml
===================================================================
--- jbpm3/trunk/hudson/hudson-home/jobs/jBPM3-Database-Matrix/config.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/hudson/hudson-home/jobs/jBPM3-Database-Matrix/config.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -44,6 +44,7 @@
         <string>mysql</string>
         <string>postgresql</string>
         <string>sybase</string>
+        <string>oracle</string>
       </values>
     </axis>
     <axis>

Modified: jbpm3/trunk/hudson/profiles.xml.local.qa
===================================================================
--- jbpm3/trunk/hudson/profiles.xml.local.qa	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/hudson/profiles.xml.local.qa	2009-04-02 22:50:29 UTC (rev 4398)
@@ -13,7 +13,6 @@
       </activation>
 
       <properties>
-
         <jdbc.mysql.server>localhost</jdbc.mysql.server>
         <jdbc.mysql.port>3306</jdbc.mysql.port>
         <jdbc.mysql.database>jbpmtest</jdbc.mysql.database>
@@ -37,8 +36,14 @@
         <jdbc.postgresql.username>jbpmtest</jdbc.postgresql.username>
         <jdbc.postgresql.password></jdbc.postgresql.password>
 
+        <jdbc.oracle.server>localhost</jdbc.oracle.server>
+        <jdbc.oracle.port>1521</jdbc.oracle.port>
+        <jdbc.oracle.database>XE</jdbc.oracle.database>
+        <jdbc.oracle.url>jdbc:oracle:thin:@${jdbc.oracle.server}:${jdbc.oracle.port}:${jdbc.oracle.database}</jdbc.oracle.url>
+        <jdbc.oracle.username>jbpmtest</jdbc.oracle.username>
+        <jdbc.oracle.password>jbpmtest</jdbc.oracle.password>
       </properties>
     </profile>
-
+    
   </profiles>
 </profilesXml>

Modified: jbpm3/trunk/modules/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/core/pom.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/pom.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -198,27 +198,27 @@
       <id>soa</id>
       <build>
         <plugins>
-            <plugin>
-              <artifactId>maven-antrun-plugin</artifactId>
-              <executions>
-                <execution>
-                  <phase>process-resources</phase>
-                  <goals>
-                    <goal>run</goal>
-                  </goals>
-                  <configuration>
-                    <tasks>
-                      <property name="database" value="${database}" />
-                      <ant antfile="scripts/antrun-jbpm-config.xml" target="generate-jbpm-cfg-soa" />
-                    </tasks>
-                  </configuration>
-                </execution>
-              </executions>
-            </plugin>          
+          <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>process-resources</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+                    <property name="database" value="${database}" />
+                    <ant antfile="scripts/antrun-jbpm-config.xml" target="generate-jbpm-cfg-soa" />
+                  </tasks>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
     </profile>
-    
+
     <!-- 
     Name:  no-database
     Descr: Setup the default database   
@@ -328,5 +328,27 @@
         </plugins>
       </build>
     </profile>
+
+    <!-- 
+    Name:  oracle
+    Descr: Oracle Database Setup   
+    -->
+    <profile>
+      <id>oracle</id>
+      <activation>
+        <property>
+          <name>database</name>
+          <value>oracle</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
   </profiles>
 </project>

Modified: jbpm3/trunk/modules/core/src/main/resources/hibernate.properties.oracle.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/hibernate.properties.oracle.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/hibernate.properties.oracle.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,12 +1,10 @@
 
     <!-- hibernate dialect -->
-    <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
+    <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
 
     <!-- JDBC connection properties (begin) -->
-    <!-- fetch driver from http://www.oracle.com -->
     <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
     <property name="hibernate.connection.url">${jdbc.oracle.url}</property>
     <property name="hibernate.connection.username">${jdbc.oracle.username}</property>
     <property name="hibernate.connection.password">${jdbc.oracle.password}</property>
     <!-- JDBC connection properties (end) -->
-

Modified: jbpm3/trunk/modules/core/src/main/resources/jbpm-mysql-ds.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/jbpm-mysql-ds.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/jbpm-mysql-ds.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<datasources>
 
+<datasources>
   <xa-datasource>
     <jndi-name>JbpmDS</jndi-name>
 
@@ -13,7 +13,7 @@
 
     <!-- reduce isolation from the default level (repeatable read) -->
     <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
-    <!-- separate connections used with and without JTA transaction -->
+    <!-- separate connections used inside and outside a JTA transaction -->
     <no-tx-separate-pools />
     <!-- disable transaction interleaving -->
     <track-connection-by-tx />
@@ -31,5 +31,4 @@
       <type-mapping>mySQL</type-mapping>
     </metadata>
   </xa-datasource>
-
 </datasources>
\ No newline at end of file

Copied: jbpm3/trunk/modules/core/src/main/resources/jbpm-oracle-ds.xml (from rev 4349, jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/jbpm-oracle-ds.xml)
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/jbpm-oracle-ds.xml	                        (rev 0)
+++ jbpm3/trunk/modules/core/src/main/resources/jbpm-oracle-ds.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<datasources>
+  <xa-datasource>
+    <jndi-name>JbpmDS</jndi-name>
+
+    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+    <xa-datasource-property name="URL">${jdbc.oracle.url}</xa-datasource-property>
+    <user-name>${jdbc.oracle.username}</user-name>
+    <password>${jdbc.oracle.password}</password>
+
+    <!-- separate connections used inside and outside a JTA transaction -->
+    <no-tx-separate-pools />
+    <!-- disable transaction interleaving -->
+    <track-connection-by-tx />
+
+    <isSameRM-override-value>false</isSameRM-override-value>
+
+    <!-- check oracle error codes and messages for fatal errors -->
+    <exception-sorter-class-name>
+      org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
+    </exception-sorter-class-name>
+    <!-- use pingDatabase method to check a connection is still valid -->
+    <valid-connection-checker-class-name>
+      org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker
+    </valid-connection-checker-class-name>
+
+    <!-- corresponding type-mapping in standardjbosscmp-jdbc.xml -->
+    <metadata>
+      <type-mapping>Oracle9i</type-mapping>
+    </metadata>
+  </xa-datasource>
+
+  <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter" 
+         name="jboss.jca:service=OracleXAExceptionFormatter">
+    <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
+  </mbean>
+</datasources>
\ No newline at end of file

Modified: jbpm3/trunk/modules/core/src/main/resources/jbpm-postgresql-ds.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/jbpm-postgresql-ds.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/jbpm-postgresql-ds.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<datasources>
 
+<datasources>
   <xa-datasource>
     <jndi-name>JbpmDS</jndi-name>
 
@@ -19,5 +19,4 @@
       <type-mapping>PostgreSQL 8.0</type-mapping>
     </metadata>
   </xa-datasource>
-
 </datasources>

Modified: jbpm3/trunk/modules/core/src/main/resources/jbpm-sybase-ds.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/jbpm-sybase-ds.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/jbpm-sybase-ds.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <datasources>
-
   <xa-datasource>
     <jndi-name>JbpmDS</jndi-name>
     
@@ -12,6 +11,8 @@
     <user-name>${jdbc.sybase.username}</user-name>
     <password>${jdbc.sybase.password}</password>
 
+    <!-- separate connections used inside and outside a JTA transaction -->
+    <no-tx-separate-pools />
     <!-- disable transaction interleaving -->
     <track-connection-by-tx />
 
@@ -24,5 +25,4 @@
       <type-mapping>Sybase</type-mapping>
     </metadata>
   </xa-datasource>
-
 </datasources>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -5,15 +5,18 @@
     "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 
 <hibernate-mapping auto-import="false" default-access="field">
-  <subclass name="org.jbpm.context.exe.variableinstance.ByteArrayInstance" 
-            extends="org.jbpm.context.exe.VariableInstance" 
+
+  <subclass name="org.jbpm.context.exe.variableinstance.ByteArrayInstance"
+            extends="org.jbpm.context.exe.VariableInstance"
             discriminator-value="B">
-    
-    <many-to-one name="value" 
+
+    <many-to-one name="value"
                  class="org.jbpm.bytes.ByteArray"
                  column="BYTEARRAYVALUE_"
                  cascade="all"
-                 foreign-key="FK_BYTEINST_ARRAY" />
+                 foreign-key="FK_BYTEINST_ARRAY"
+                 index="IDX_BYTEINST_ARRAY" />
   </subclass>
+
 </hibernate-mapping>
 

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/log/VariableLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/log/VariableLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/log/VariableLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -8,10 +8,12 @@
   <subclass name="org.jbpm.context.log.VariableLog" 
             extends="org.jbpm.logging.log.ProcessLog"
             discriminator-value="V">
-            
+
     <many-to-one name="variableInstance" 
                  column="VARIABLEINSTANCE_" 
-                 foreign-key="FK_LOG_VARINST" />
+                 cascade="save-update" 
+                 foreign-key="FK_LOG_VARINST"
+                 index="FK_LOG_VARINST" />
 
   </subclass>
 

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -14,12 +14,14 @@
                  class="org.jbpm.bytes.ByteArray"
                  column="OLDBYTEARRAY_"
                  cascade="all"
-                 foreign-key="FK_LOG_OLDBYTES" />
+                 foreign-key="FK_LOG_OLDBYTES"
+                 index="IDX_LOG_OLDBYTES" />
     <many-to-one name="newValue" 
                  class="org.jbpm.bytes.ByteArray"
                  column="NEWBYTEARRAY_"
                  cascade="all"
-                 foreign-key="FK_LOG_NEWBYTES" />
+                 foreign-key="FK_LOG_NEWBYTES"
+                 index="IDX_LOG_NEWBYTES" />
   </subclass>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/def/Action.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/def/Action.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/def/Action.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -23,7 +23,8 @@
     <many-to-one name="referencedAction" 
                  column="REFERENCEDACTION_"
                  cascade="all"
-                 foreign-key="FK_ACTION_REFACT" />
+                 foreign-key="FK_ACTION_REFACT"
+                 index="IDX_ACTION_REFACT" />
     <many-to-one name="actionDelegation"
                  column="ACTIONDELEGATION_"
                  cascade="all"  

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ActionLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ActionLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ActionLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -6,12 +6,16 @@
 
 <hibernate-mapping auto-import="false" default-access="field">
 
-  <subclass name="org.jbpm.graph.log.ActionLog" extends="org.jbpm.logging.log.CompositeLog" discriminator-value="A">
+  <subclass name="org.jbpm.graph.log.ActionLog"
+            extends="org.jbpm.logging.log.CompositeLog"
+            discriminator-value="A">
 
     <property name="exception" column="EXCEPTION_" type="string" length="4000"/>
-
-    <many-to-one name="action" column="ACTION_" class="org.jbpm.graph.def.Action" foreign-key="FK_LOG_ACTION" />
-
+    
+    <many-to-one name="action"
+                 column="ACTION_"
+                 foreign-key="FK_LOG_ACTION"
+                 index="FK_LOG_ACTION" />
   </subclass>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ActionLog.sybase.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ActionLog.sybase.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ActionLog.sybase.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -6,12 +6,16 @@
 
 <hibernate-mapping auto-import="false" default-access="field">
 
-  <subclass name="org.jbpm.graph.log.ActionLog" extends="org.jbpm.logging.log.CompositeLog" discriminator-value="A">
+  <subclass name="org.jbpm.graph.log.ActionLog"
+            extends="org.jbpm.logging.log.CompositeLog"
+            discriminator-value="A">
 
     <property name="exception" column="EXCEPTION_" type="text" length="4000"/>
 
-    <many-to-one name="action" column="ACTION_" class="org.jbpm.graph.def.Action" foreign-key="FK_LOG_ACTION" />
-
+    <many-to-one name="action"
+                 column="ACTION_"
+                 foreign-key="FK_LOG_ACTION"
+                 index="FK_LOG_ACTION" />
   </subclass>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/NodeLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/NodeLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/NodeLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -12,8 +12,8 @@
             
     <many-to-one name="node" 
                  column="NODE_" 
-                 class="org.jbpm.graph.def.Node" 
-                 foreign-key="FK_LOG_NODE" />
+                 foreign-key="FK_LOG_NODE"
+                 index="IDX_LOG_NODE" />
     <property name="enter"
               column="ENTER_" />
     <property name="leave"

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ProcessStateLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ProcessStateLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/ProcessStateLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -9,7 +9,10 @@
   <subclass name="org.jbpm.graph.log.ProcessStateLog" 
             extends="org.jbpm.graph.log.NodeLog"
             discriminator-value="Z">
-    <many-to-one name="subProcessInstance" column="NEWLONGVALUE_" class="org.jbpm.graph.exe.ProcessInstance" foreign-key="none" />
+
+    <many-to-one name="subProcessInstance"
+                 column="NEWLONGVALUE_"
+                 foreign-key="none" />
   </subclass>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/SignalLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/SignalLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/SignalLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -9,7 +9,11 @@
   <subclass name="org.jbpm.graph.log.SignalLog" 
             extends="org.jbpm.logging.log.CompositeLog"
             discriminator-value="S">
-    <many-to-one name="transition" column="TRANSITION_" class="org.jbpm.graph.def.Transition" foreign-key="FK_LOG_TRANSITION" />
+
+    <many-to-one name="transition"
+                 column="TRANSITION_"
+                 foreign-key="FK_LOG_TRANSITION"
+                 index="IDX_LOG_TRANSITION" />
   </subclass>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TokenCreateLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TokenCreateLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TokenCreateLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -9,11 +9,11 @@
   <subclass name="org.jbpm.graph.log.TokenCreateLog" 
             extends="org.jbpm.logging.log.ProcessLog"
             discriminator-value="O">
-            
+
     <many-to-one name="child" 
                  column="CHILD_" 
-                 class="org.jbpm.graph.exe.Token" 
-                 foreign-key="FK_LOG_CHILDTOKEN" />
+                 foreign-key="FK_LOG_CHILDTOKEN"
+                 index="IDX_LOG_CHILDTOKEN" />
   </subclass>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TokenEndLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TokenEndLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TokenEndLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -12,8 +12,8 @@
             
     <many-to-one name="child" 
                  column="CHILD_" 
-                 class="org.jbpm.graph.exe.Token" 
-                 foreign-key="FK_LOG_CHILDTOKEN" />
+                 foreign-key="FK_LOG_CHILDTOKEN"
+                 index="IDX_LOG_CHILDTOKEN" />
   </subclass>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TransitionLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TransitionLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/log/TransitionLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -12,16 +12,16 @@
             
     <many-to-one name="transition" 
                  column="TRANSITION_" 
-                 class="org.jbpm.graph.def.Transition" 
-                 foreign-key="FK_LOG_TRANSITION" />
+                 foreign-key="FK_LOG_TRANSITION"
+                 index="IDX_LOG_TRANSITION" />
     <many-to-one name="sourceNode" 
                  column="SOURCENODE_" 
-                 class="org.jbpm.graph.def.Node" 
-                 foreign-key="FK_LOG_SOURCENODE" />
+                 foreign-key="FK_LOG_SOURCENODE"
+                 index="IDX_LOG_SOURCENODE" />
     <many-to-one name="destinationNode" 
                  column="DESTINATIONNODE_" 
-                 class="org.jbpm.graph.def.Node" 
-                 foreign-key="FK_LOG_DESTNODE" />
+                 foreign-key="FK_LOG_DESTNODE"
+                 index="IDX_LOG_DESTNODE" />
   </subclass>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Decision.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Decision.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Decision.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -21,10 +21,10 @@
     </list>
     
     <many-to-one name="decisionDelegation"
-                 class="org.jbpm.instantiation.Delegation"
                  column="DECISIONDELEGATION"
                  foreign-key="FK_DECISION_DELEG"
-                 cascade="all" />
+                 cascade="all"
+                 index="IDX_DECISION_DELEG" />
 
   </subclass>
 

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Fork.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Fork.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Fork.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -12,7 +12,8 @@
     <many-to-one name="script"
                  column="SCRIPT_"
                  foreign-key="FK_NODE_SCRIPT"
-                 cascade="all" />
+                 cascade="all"
+                 index="IDX_NODE_SCRIPT" />
 
   </subclass>
 

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Join.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Join.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Join.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -6,8 +6,6 @@
 <hibernate-mapping auto-import="false" default-access="field" >
 
   <subclass name="org.jbpm.graph.node.Join" discriminator-value="J"
-  	extends="org.jbpm.graph.def.Node">
-  	<property name="parentLockMode" column="PARENTLOCKMODE_"/>
-  </subclass>
+  	extends="org.jbpm.graph.def.Node" />
 
 </hibernate-mapping>

Copied: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Join.lock.hbm.xml (from rev 4349, jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/node/Join.lock.hbm.xml)
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Join.lock.hbm.xml	                        (rev 0)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/graph/node/Join.lock.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping auto-import="false" default-access="field" >
+
+  <subclass name="org.jbpm.graph.node.Join" discriminator-value="J"
+    extends="org.jbpm.graph.def.Node">
+    <property name="parentLockMode" column="PARENTLOCKMODE_"/>
+  </subclass>
+
+</hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/instantiation/Delegation.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/instantiation/Delegation.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/instantiation/Delegation.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -15,8 +15,7 @@
     <many-to-one name="processDefinition" 
                  column="PROCESSDEFINITION_"
                  foreign-key="FK_DELEGATION_PRCD"
-                 index="IDX_DELEG_PRCD"
-                 cascade="none" />
+                 index="IDX_DELEG_PRCD" />
     
   </class>
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/ExecuteActionJob.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/ExecuteActionJob.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/ExecuteActionJob.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -13,7 +13,8 @@
     <many-to-one name="action"   
                  column="ACTION_" 
                  cascade="none"
-                 foreign-key="FK_JOB_ACTION"/>
+                 foreign-key="FK_JOB_ACTION"
+                 index="IDX_JOB_ACTION"/>
 
   </subclass>
 

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/ExecuteNodeJob.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/ExecuteNodeJob.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/ExecuteNodeJob.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -12,8 +12,8 @@
 
     <many-to-one name="node"   
                  column="NODE_" 
-                 cascade="none"
-                 foreign-key="FK_JOB_NODE"/>
+                 foreign-key="FK_JOB_NODE"
+                 index="IDX_JOB_NODE"/>
 
   </subclass>
 

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -15,9 +15,18 @@
 
     <property name="dueDate" column="DUEDATE_" type="timestamp" />
 
-    <many-to-one name="processInstance" column="PROCESSINSTANCE_" cascade="none" foreign-key="FK_JOB_PRINST" index="IDX_JOB_PRINST" />
-    <many-to-one name="token" column="TOKEN_" cascade="none" foreign-key="FK_JOB_TOKEN" index="IDX_JOB_TOKEN" />
-    <many-to-one name="taskInstance" column="TASKINSTANCE_" cascade="none" foreign-key="FK_JOB_TSKINST" index="IDX_JOB_TSKINST" />
+    <many-to-one name="processInstance"
+                 column="PROCESSINSTANCE_"
+                 foreign-key="FK_JOB_PRINST"
+                 index="IDX_JOB_PRINST" />
+    <many-to-one name="token"
+                 column="TOKEN_"
+                 foreign-key="FK_JOB_TOKEN"
+                 index="IDX_JOB_TOKEN" />
+    <many-to-one name="taskInstance"
+                 column="TASKINSTANCE_"
+                 foreign-key="FK_JOB_TSKINST"
+                 index="IDX_JOB_TSKINST" />
 
     <property name="isSuspended" column="ISSUSPENDED_" />
     <property name="isExclusive" column="ISEXCLUSIVE_" />

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Job.sybase.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Job.sybase.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Job.sybase.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -15,9 +15,18 @@
 
     <property name="dueDate" column="DUEDATE_" type="timestamp" />
 
-    <many-to-one name="processInstance" column="PROCESSINSTANCE_" cascade="none" foreign-key="FK_JOB_PRINST" index="IDX_JOB_PRINST" />
-    <many-to-one name="token" column="TOKEN_" cascade="none" foreign-key="FK_JOB_TOKEN" index="IDX_JOB_TOKEN" />
-    <many-to-one name="taskInstance" column="TASKINSTANCE_" cascade="none" foreign-key="FK_JOB_TSKINST" index="IDX_JOB_TSKINST" />
+    <many-to-one name="processInstance"
+                 column="PROCESSINSTANCE_"
+                 foreign-key="FK_JOB_PRINST"
+                 index="IDX_JOB_PRINST" />
+    <many-to-one name="token"
+                 column="TOKEN_"
+                 foreign-key="FK_JOB_TOKEN"
+                 index="IDX_JOB_TOKEN" />
+    <many-to-one name="taskInstance"
+                 column="TASKINSTANCE_"
+                 foreign-key="FK_JOB_TSKINST"
+                 index="IDX_JOB_TSKINST" />
 
     <property name="isSuspended" column="ISSUSPENDED_" />
     <property name="isExclusive" column="ISEXCLUSIVE_" />

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Timer.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Timer.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/job/Timer.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -16,8 +16,8 @@
 
     <many-to-one name="action"   
                  column="ACTION_" 
-                 cascade="none"
-                 foreign-key="FK_JOB_ACTION"/>
+                 foreign-key="FK_JOB_ACTION"
+                 index="IDX_JOB_ACTION"/>
     
     <any name="graphElement" id-type="long" cascade="none">
       <column name="GRAPHELEMENTTYPE_"/>

Deleted: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/jpdl/xml/jpdl-3.3.xsd
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/jpdl/xml/jpdl-3.3.xsd	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/jpdl/xml/jpdl-3.3.xsd	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,511 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xs:schema targetNamespace="urn:jbpm.org:jpdl-3.3"
-           elementFormDefault="qualified"
-           xmlns="urn:jbpm.org:jpdl-3.3"
-           xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
-  <!--  PROCESS-DEFINITION -->
-  <!--  ################## -->
-  <xs:element name="process-definition">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="description" />
-        <xs:element ref="swimlane" />
-        <xs:element ref="start-state" />
-        <xs:group   ref="node-elements"/>
-        <xs:group   ref="action-elements" />
-        <xs:element ref="event" />
-        <xs:element ref="exception-handler" />
-        <xs:element ref="task" />
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required" />
-    </xs:complexType>
-  </xs:element>
-
-  <!--  SWIMLANE -->
-  <!--  ######## -->
-  <xs:element name="swimlane">
-    <xs:complexType>
-      <xs:sequence minOccurs="0" maxOccurs="1">
-        <xs:element ref="assignment"/>
-      </xs:sequence>
-      <xs:attribute name="name" type="xs:string" use="required" />
-    </xs:complexType>
-  </xs:element>
-
-  <!--  NODES -->
-  <!--  ##### -->
-  <xs:element name="start-state">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="description" />
-        <xs:element ref="task"/>
-        <xs:element ref="transition"/>
-        <xs:element ref="event"/>
-        <xs:element ref="exception-handler"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string"/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="end-state">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="description" />
-        <xs:element ref="event"/>
-        <xs:element ref="exception-handler"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="end-complete-process" type="booleanType" use="optional" default="false"/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="decision">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="description" />
-        <xs:element name="handler" type="delegation" />
-        <xs:element ref="event"/>
-        <xs:element ref="exception-handler"/>
-        <xs:element ref="transition"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="expression" type="xs:string" />
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="fork">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="script" />
-        <xs:group ref="node-content-elements" />
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-  
-  <xs:element name="join">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:group ref="node-content-elements" />
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-      <xs:attribute name="lock" type="lockMode"/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="node">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:choice minOccurs="0" maxOccurs="1">
-          <xs:group ref="action-elements" />
-        </xs:choice>
-        <xs:choice minOccurs="0" maxOccurs="unbounded">
-          <xs:group ref="node-content-elements" />
-        </xs:choice>
-      </xs:sequence>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="process-state">
-    <xs:complexType>
-    	<xs:choice minOccurs="0" maxOccurs="unbounded">
-    		<xs:element name="sub-process">
-    			<xs:complexType>
-    				<xs:attribute name="name" type="xs:string"
-    					use="required" />
-    				<xs:attribute name="version" type="xs:integer" />
-    				<xs:attribute name="binding" type="xs:string" />
-    			</xs:complexType>
-    		</xs:element>
-    		<xs:element ref="variable" />
-    		<xs:group ref="node-content-elements" />
-    	</xs:choice>
-    	<xs:attribute name="name" type="xs:string" use="required" />
-    	<xs:attribute name="async" type="xs:string" default="false" />
-    	<xs:attribute name="binding" type="bindingType"/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="state">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:group ref="node-content-elements"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="super-state">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:group ref="node-elements"/>
-        <xs:group ref="node-content-elements"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="task-node">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="task" />
-        <xs:group ref="node-content-elements" />
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="create-tasks" type="booleanType" default="true" />
-      <xs:attribute name="end-tasks" type="booleanType" default="false" />
-      <xs:attribute name="signal" default="last">
-        <xs:simpleType>
-          <xs:restriction base="xs:string">
-            <xs:enumeration value="unsynchronized"/>
-            <xs:enumeration value="never"/>
-            <xs:enumeration value="first"/>
-            <xs:enumeration value="first-wait"/>
-            <xs:enumeration value="last"/>
-            <xs:enumeration value="last-wait"/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="mail-node">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="subject" />
-        <xs:element ref="text" />
-        <xs:group ref="node-content-elements"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-      <xs:attribute name="template" type="xs:string"/>
-      <xs:attribute name="actors" type="xs:string"/>
-      <xs:attribute name="to" type="xs:string"/>
-      <xs:attribute name="subject" type="xs:string"/>
-      <xs:attribute name="text" type="xs:string"/>
-    </xs:complexType>
-  </xs:element>
-
-
-  <!--  TRANSITION -->
-  <!--  ########## -->
-  <xs:element name="transition">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-         <xs:element ref="description" />
-         <xs:element name="condition">
-           <xs:complexType mixed="true">
-             <xs:sequence minOccurs="0" maxOccurs="unbounded">
-               <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
-             </xs:sequence>
-             <xs:attribute name="expression" type="xs:string" />
-           </xs:complexType>
-         </xs:element>
-        <xs:group ref="action-elements"/>
-        <xs:element ref="exception-handler" />
-      </xs:choice>
-      <xs:attribute name="to" type="xs:string" use="required" />
-      <xs:attribute name="name" type="xs:string" />
-    </xs:complexType>
-  </xs:element>
-
-  <!-- ACTIONS -->
-  <!-- ####### -->
-  <xs:element name="action">
-    <xs:complexType mixed="true">
-      <xs:sequence>
-        <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
-      </xs:sequence>
-      <xs:attribute name="class" type="xs:string" />
-      <xs:attribute name="config-type" default="field" type="xs:string" />
-      <xs:attribute name="name" type="xs:string" />
-      <xs:attribute name="ref-name" type="xs:string" />
-      <xs:attribute name="accept-propagated-events" type="booleanType" default="true" />
-      <xs:attribute name="expression" type="xs:string" />
-      <xs:attribute name="async" type="xs:string" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="cancel-timer">
-    <xs:complexType>
-      <xs:attribute name="name" type="xs:string" use="required" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="create-timer">
-    <xs:complexType>
-      <xs:choice  minOccurs="0">
-        <xs:element ref="action"/>
-        <xs:element ref="script"/>
-      </xs:choice>
-      <xs:attribute name="duedate" type="xs:string" use="required" />
-      <xs:attribute name="name" type="xs:string" />
-      <xs:attribute name="repeat" type="xs:string" />
-      <xs:attribute name="transition" type="xs:string" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="script">
-    <xs:complexType  mixed="true">
-      <xs:sequence>
-        <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
-      </xs:sequence>
-      <xs:attribute name="name" type="xs:string" />
-      <xs:attribute name="accept-propagated-events" type="booleanType" default="true" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="mail">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="subject" />
-        <xs:element ref="text" />
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-      <xs:attribute name="template" type="xs:string"/>
-      <xs:attribute name="actors" type="xs:string"/>
-      <xs:attribute name="to" type="xs:string"/>
-      <xs:attribute name="subject" type="xs:string"/>
-      <xs:attribute name="text" type="xs:string"/>
-    </xs:complexType>
-  </xs:element>
-
-  <!--  EVENT -->
-  <!--  ##### -->
-  <xs:element name="event">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:group ref="action-elements"/>
-      </xs:choice>
-      <xs:attribute name="type" use="required">
-        <xs:simpleType>
-          <xs:union>
-            <xs:simpleType>
-              <xs:restriction base="xs:string"/>
-            </xs:simpleType>
-            <xs:simpleType>
-              <xs:restriction base="xs:string">
-                <xs:enumeration value="node-enter"/>
-                <xs:enumeration value="node-leave"/>
-                <xs:enumeration value="process-start"/>
-                <xs:enumeration value="process-end"/>
-                <xs:enumeration value="task-create"/>
-                <xs:enumeration value="task-assign"/>
-                <xs:enumeration value="task-start"/>
-                <xs:enumeration value="task-end"/>
-                <xs:enumeration value="before-signal"/>
-                <xs:enumeration value="after-signal"/>
-                <xs:enumeration value="superstate-enter"/>
-                <xs:enumeration value="superstate-leave"/>
-                <xs:enumeration value="timer-create"/>
-                <xs:enumeration value="subprocess-created"/>
-                <xs:enumeration value="subprocess-end"/>
-              </xs:restriction>
-            </xs:simpleType>
-          </xs:union>
-        </xs:simpleType>
-      </xs:attribute>
-    </xs:complexType>
-  </xs:element>
-
-  <!--  EXCEPTION-HANDLER -->
-  <!--  ################# -->
-  <xs:element name="exception-handler">
-    <xs:complexType>
-      <xs:choice minOccurs="1" maxOccurs="unbounded">
-        <xs:element ref="action"/>
-        <xs:element ref="script"/>
-      </xs:choice>
-      <xs:attribute name="exception-class" type="xs:string"/>
-    </xs:complexType>
-  </xs:element>
-
-  <!--  TASK -->
-  <!--  #### -->
-  <xs:element name="task">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="description" />
-        <xs:element ref="assignment"/>
-        <xs:element ref="controller"/>
-        <xs:element ref="event"/>
-        <xs:element ref="timer"/>
-        <xs:element name="reminder">
-          <xs:complexType>
-            <xs:attribute name="duedate" type="xs:string" use="required" />
-            <xs:attribute name="repeat" type="xs:string" />
-          </xs:complexType>
-        </xs:element>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" />
-      <xs:attribute name="blocking" type="booleanType" default="false"/>
-      <xs:attribute name="signalling" type="booleanType" default="true"/>
-      <xs:attribute name="description" type="xs:string" />
-      <xs:attribute name="duedate" type="xs:string" />
-      <xs:attribute name="swimlane" type="xs:string" />
-      <xs:attribute name="priority" type="priorityType" default="normal" />
-      <xs:attribute name="notify" type="booleanType" default="false"/>
-    </xs:complexType>
-  </xs:element>
-  
-  <xs:element name="controller" type="delegation" />
-
-  <xs:element name="assignment">
-    <xs:complexType>
-      <xs:complexContent>
-        <xs:extension base="delegation">
-          <xs:attribute name="expression" type="xs:string" />
-          <xs:attribute name="actor-id" type="xs:string" />
-          <xs:attribute name="pooled-actors" type="xs:string" />
-        </xs:extension>
-      </xs:complexContent>
-    </xs:complexType>
-  </xs:element>
-
-  <!--  TIMER -->
-  <!--  ##### -->
-  <xs:element name="timer">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="1">
-        <xs:group ref="action-elements" />
-      </xs:choice>
-      <xs:attribute name="duedate" type="xs:string" use="required" />
-      <xs:attribute name="name" type="xs:string" />
-      <xs:attribute name="repeat" type="xs:string" />
-      <xs:attribute name="transition" type="xs:string" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="variable">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
-      </xs:sequence>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="access" type="xs:string" default="read,write"/>
-      <xs:attribute name="mapped-name" type="xs:string" />
-    </xs:complexType>
-  </xs:element>
-
-  <!--  MAIL  -->
-  <!--  #### -->
-  <xs:element name="to" type="xs:string"/>
-  <xs:element name="recipients" type="xs:string"/>
-  <xs:element name="subject" type="xs:string"/>
-  <xs:element name="text" type="xs:string"/>
-  <xs:element name="template" type="xs:string"/>
-
-  <!-- TYPES AND GROUPS -->
-  <!-- ################ -->
-
-  <xs:element name="description" type="xs:string" />
-
-  <xs:complexType name="delegation" mixed="true">
-    <xs:sequence>
-      <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
-    </xs:sequence>
-    <xs:attribute name="class" type="xs:string" />
-    <xs:attribute name="config-type" default="field" type="xs:string" />
-  </xs:complexType>
-
-  <xs:simpleType name="configType">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="field"/>
-      <xs:enumeration value="bean"/>
-      <xs:enumeration value="constructor"/>
-      <xs:enumeration value="configuration-property"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name="booleanType">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="yes"/>
-      <xs:enumeration value="no"/>
-      <xs:enumeration value="true"/>
-      <xs:enumeration value="false"/>
-      <xs:enumeration value="on"/>
-      <xs:enumeration value="off"/>
-    </xs:restriction>
-  </xs:simpleType>
-  
-  <xs:simpleType name="priorityType">
-    <xs:union>
-      <xs:simpleType>
-        <xs:restriction base="xs:string">
-          <xs:enumeration value="highest"/>
-          <xs:enumeration value="high"/>
-          <xs:enumeration value="normal"/>
-          <xs:enumeration value="low"/>
-          <xs:enumeration value="lowest"/>
-        </xs:restriction>
-      </xs:simpleType>
-      <xs:simpleType>
-        <xs:restriction base="xs:int"/>
-      </xs:simpleType>
-    </xs:union>
-  </xs:simpleType>
-
-  <xs:group name="node-elements">
-    <xs:choice>
-      <xs:element ref="node"/>
-      <xs:element ref="state"/>
-      <xs:element ref="task-node"/>
-      <xs:element ref="super-state"/>
-      <xs:element ref="process-state"/>
-      <xs:element ref="fork"/>
-      <xs:element ref="join"/>
-      <xs:element ref="decision"/>
-      <xs:element ref="end-state"/>
-      <xs:element ref="mail-node"/>
-    </xs:choice>
-  </xs:group>
-  
-  <xs:group name="action-elements">
-    <xs:choice>
-      <xs:element ref="action"/>
-      <xs:element ref="script"/>
-      <xs:element ref="create-timer"/>
-      <xs:element ref="cancel-timer"/>
-      <xs:element ref="mail"/>
-    </xs:choice>
-  </xs:group>
-  
-  <xs:group name="node-content-elements">
-    <xs:choice>
-      <xs:element ref="description" />
-      <xs:element ref="event"/>
-      <xs:element ref="exception-handler"/>
-      <xs:element ref="timer"/>
-      <xs:element ref="transition"/>
-    </xs:choice>
-  </xs:group>
-
-  <xs:simpleType name="bindingType">
-    <xs:restriction base="xs:string">
-  	  <xs:enumeration value="late"/>
-  	  <xs:enumeration value="early"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name="lockMode">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="NONE"/>
-      <xs:enumeration value="READ"/>
-      <xs:enumeration value="UPGRADE"/>
-      <xs:enumeration value="UPGRADE_NOWAIT"/>
-      <xs:enumeration value="FORCE"/>
-      <xs:enumeration value="pessimistic"/>
-    </xs:restriction>
-  </xs:simpleType>
-</xs:schema>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/logging/log/ProcessLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/logging/log/ProcessLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/logging/log/ProcessLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -48,12 +48,12 @@
     <property name="date" column="DATE_" />
     <many-to-one name="token" 
                  column="TOKEN_" 
-                 class="org.jbpm.graph.exe.Token"
-                 foreign-key="FK_LOG_TOKEN" />
+                 foreign-key="FK_LOG_TOKEN"
+                 index="IDX_LOG_TOKEN" />
     <many-to-one name="parent" 
                  column="PARENT_" 
-                 class="org.jbpm.logging.log.CompositeLog" 
-                 foreign-key="FK_LOG_PARENT" />
+                 foreign-key="FK_LOG_PARENT"
+                 index="IDX_LOG_PARENT" />
   </class>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/scheduler/def/CreateTimerAction.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/scheduler/def/CreateTimerAction.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/scheduler/def/CreateTimerAction.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -18,7 +18,8 @@
     <many-to-one name="timerAction" 
                  column="TIMERACTION_" 
                  foreign-key="FK_CRTETIMERACT_TA"
-                 cascade="all" />
+                 cascade="all"
+                 index="IDX_CRTETIMERACT_TA" />
 
   </subclass>
 

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/Swimlane.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/Swimlane.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/Swimlane.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -17,10 +17,12 @@
     <many-to-one name="assignmentDelegation" 
                  column="ASSIGNMENTDELEGATION_" 
                  foreign-key="FK_SWL_ASSDEL"
-                 cascade="all" />
+                 cascade="all"
+                 index="IDX_SWL_ASSDEL" />
     <many-to-one name="taskMgmtDefinition"   
                  column="TASKMGMTDEFINITION_" 
-                 foreign-key="FK_SWL_TSKMGMTDEF"/>
+                 foreign-key="FK_SWL_TSKMGMTDEF"
+                 index="IDX_SWL_TSKMGMTDEF" />
 
     <set name="tasks" cascade="all" inverse="true">
       <key column="SWIMLANE_" />

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/Task.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/Task.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/Task.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -48,18 +48,22 @@
                  index="IDX_TASK_TSKNODE"/>
     <many-to-one name="startState"
                  column="STARTSTATE_" 
-                 foreign-key="FK_TASK_STARTST"/>
+                 foreign-key="FK_TASK_STARTST"
+                 index="IDX_TASK_STARTST"/>
     <many-to-one name="assignmentDelegation" 
                  column="ASSIGNMENTDELEGATION_" 
                  foreign-key="FK_TASK_ASSDEL"
-                 cascade="all" />
+                 cascade="all"
+                 index="IDX_TASK_ASSDEL" />
     <many-to-one name="swimlane"
                  column="SWIMLANE_" 
-                 foreign-key="FK_TASK_SWIMLANE"/>
+                 foreign-key="FK_TASK_SWIMLANE"
+                 index="IDX_TASK_SWIMLANE"/>
     <many-to-one name="taskController" 
                  column="TASKCONTROLLER_" 
                  foreign-key="FK_TSK_TSKCTRL"
-                 cascade="all" />
+                 cascade="all"
+                 index="IDX_TSK_TSKCTRL" />
                  
   </class>
 

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/TaskController.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/TaskController.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/TaskController.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -13,7 +13,8 @@
     <many-to-one name="taskControllerDelegation" 
                  column="TASKCONTROLLERDELEGATION_" 
                  foreign-key="FK_TSKCTRL_DELEG"
-                 cascade="all" />
+                 cascade="all"
+                 index="IDX_TSKCTRL_DELEG" />
 
     <list name="variableAccesses" cascade="all">
       <key column="TASKCONTROLLER_" foreign-key="FK_VARACC_TSKCTRL" />

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -22,7 +22,8 @@
     <many-to-one name="startTask" 
                  column="STARTTASK_" 
                  foreign-key="FK_TSKDEF_START"
-                 cascade="all" />
+                 cascade="all"
+                 index="IDX_TSKDEF_START" />
 
   </subclass>
 

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -19,7 +19,8 @@
                  index="IDX_SWIMLINST_SL"/>
     <many-to-one name="taskMgmtInstance" 
                  column="TASKMGMTINSTANCE_" 
-                 foreign-key="FK_SWIMLANEINST_TM"/>
+                 foreign-key="FK_SWIMLANEINST_TM"
+                 index="IDX_SWIMLANEINST_TM"/>
 
     <set name="pooledActors" 
          inverse="true" 

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -11,7 +11,8 @@
             discriminator-value="T">
     <many-to-one name="taskMgmtDefinition" 
                  column="TASKMGMTDEFINITION_"
-                 foreign-key="FK_TASKMGTINST_TMD"/>
+                 foreign-key="FK_TASKMGTINST_TMD"
+                 index="IDX_TASKMGTINST_TMD"/>
     <map name="swimlaneInstances" cascade="all" inverse="true">
       <!-- add on-delete for optimized deletion 
       <key column="TASKMGMTINSTANCE_" on-delete="cascade" />

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -12,8 +12,8 @@
 
     <many-to-one name="swimlaneInstance" 
                  column="SWIMLANEINSTANCE_" 
-                 class="org.jbpm.taskmgmt.exe.SwimlaneInstance" 
-                 foreign-key="FK_LOG_SWIMINST" />
+                 foreign-key="FK_LOG_SWIMINST"
+                 index="IDX_LOG_SWIMINST" />
   </subclass>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/log/TaskLog.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/log/TaskLog.hbm.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/taskmgmt/log/TaskLog.hbm.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -12,8 +12,8 @@
 
     <many-to-one name="taskInstance" 
                  column="TASKINSTANCE_" 
-                 class="org.jbpm.taskmgmt.exe.TaskInstance" 
-                 foreign-key="FK_LOG_TASKINST" />
+                 foreign-key="FK_LOG_TASKINST"
+                 index="IDX_LOG_TASKINST" />
   </subclass>
 
 </hibernate-mapping>

Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/graph/node/JoinDbTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/graph/node/JoinDbTest.java	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/graph/node/JoinDbTest.java	2009-04-02 22:50:29 UTC (rev 4398)
@@ -21,27 +21,87 @@
  */
 package org.jbpm.graph.node;
 
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.regex.Pattern;
+
 import org.hibernate.LockMode;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmException;
 import org.jbpm.db.AbstractDbTestCase;
 import org.jbpm.graph.def.ProcessDefinition;
 
 /**
  * Verifies the join node can be persisted correctly.
+ * 
  * @author Alejandro Guizar
  */
 public class JoinDbTest extends AbstractDbTestCase {
 
+  @Override
+  protected JbpmConfiguration getJbpmConfiguration() {
+    if (jbpmConfiguration == null) {
+      URL cfgResource = getClass().getClassLoader().getResource("hibernate.cfg.xml");
+      try {
+        OutputStream outStream = new FileOutputStream(new File(cfgResource.toURI().resolve(
+            "hibernate.join.cfg.xml")));
+        sed("Join.hbm.xml", "Join.lock.hbm.xml", cfgResource.openStream(), outStream);
+        outStream.close();
+      }
+      catch (URISyntaxException e) {
+        throw new AssertionError(e);
+      }
+      catch (IOException e) {
+        throw new JbpmException("could not edit hibernate configuration", e);
+      }
+      jbpmConfiguration = JbpmConfiguration.parseXmlString("<jbpm-configuration>"
+          + "  <string name='resource.hibernate.cfg.xml' value='hibernate.join.cfg.xml' />"
+          + "</jbpm-configuration>");
+    }
+    return jbpmConfiguration;
+  }
+
+  @Override
+  protected void tearDown() throws Exception {
+    super.tearDown();
+    jbpmConfiguration.close();
+  }
+
+  private static void sed(String target, String replacement, InputStream inStream,
+      OutputStream outStream) throws IOException {
+    BufferedReader reader = new BufferedReader(new InputStreamReader(inStream));
+    Writer writer = new OutputStreamWriter(outStream);
+    Pattern pattern = Pattern.compile(target, Pattern.LITERAL);
+    for (String inLine; (inLine = reader.readLine()) != null;) {
+      String outLine = pattern.matcher(inLine).replaceAll(replacement);
+      writer.write(outLine);
+      writer.write('\n');
+    }
+    reader.close();
+    writer.flush();
+  }
+
   public void testParentLockMode() {
-    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
-        "<process-definition name='" + getName() + "'>" +
-        "  <join name='read' lock='READ' />" +
-        "  <join name='nowait' lock='UPGRADE_NOWAIT' />" +
-        "  <join name='upgrade' lock='pessimistic' />" +
-        "</process-definition>");
+    ProcessDefinition processDefinition = ProcessDefinition
+        .parseXmlString("<process-definition name='"
+            + getName()
+            + "'>"
+            + "  <join name='read' lock='READ' />"
+            + "  <join name='nowait' lock='UPGRADE_NOWAIT' />"
+            + "  <join name='upgrade' lock='pessimistic' />"
+            + "</process-definition>");
     jbpmContext.deployProcessDefinition(processDefinition);
-    long processDefinitionId = processDefinition.getId();
+
     newTransaction();
-        
     try {
       processDefinition = graphSession.findLatestProcessDefinition(getName());
       Join join = (Join) processDefinition.getNode("read");
@@ -50,11 +110,9 @@
       assertEquals(LockMode.UPGRADE_NOWAIT.toString(), join.getParentLockMode());
       join = (Join) processDefinition.getNode("upgrade");
       assertEquals(LockMode.UPGRADE.toString(), join.getParentLockMode());
-
-    } finally {
-      newTransaction();
-      graphSession.deleteProcessDefinition(processDefinitionId);
     }
-
+    finally {
+      graphSession.deleteProcessDefinition(processDefinition.getId());
+    }
   }
 }

Copied: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094 (from rev 4371, jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm2094)

Deleted: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/EsbActionHandler.java
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm2094/EsbActionHandler.java	2009-04-01 02:02:46 UTC (rev 4371)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/EsbActionHandler.java	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.jbpm2094;
-
-import java.util.Random;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.dom4j.Element;
-import org.jbpm.graph.def.ActionHandler;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.util.CollectionUtil;
-
-/**
- * @author Alejandro Guizar
- */
-public class EsbActionHandler implements ActionHandler {
-
-  private String esbCategoryName;
-  private String esbServiceName;
-  private Element bpmToEsbVars;
-  private Element esbToBpmVars;
-
-  private static final long serialVersionUID = 1L;
-  private static final Log log = LogFactory.getLog(EsbActionHandler.class);
-
-  public void execute(ExecutionContext executionContext) throws Exception {
-    log.debug("simulating invocation of " + esbCategoryName + "::" + esbServiceName);
-    for (Element bpmToEsbVar : CollectionUtil.checkList(bpmToEsbVars.elements(), Element.class)) {
-      String var = bpmToEsbVar.attributeValue("bpm");
-      Object value = executionContext.getVariable(var);
-      log.debug("read " + value + " from variable " + var);
-    }
-    Random random = new Random();
-    for (Element esbToBpmVar : CollectionUtil.checkList(esbToBpmVars.elements(), Element.class)) {
-      String var = esbToBpmVar.attributeValue("bpm");
-      byte[] value = new byte[random.nextInt(2048)];
-      random.nextBytes(value);
-      executionContext.setVariable(var, value);
-      log.debug("wrote " + value.length + " bytes to variable " + var);
-    }
-    executionContext.leaveNode();
-  }
-
-}

Copied: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/EsbActionHandler.java (from rev 4371, jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm2094/EsbActionHandler.java)
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/EsbActionHandler.java	                        (rev 0)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/EsbActionHandler.java	2009-04-02 22:50:29 UTC (rev 4398)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.jbpm2094;
+
+import java.util.Random;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.dom4j.Element;
+import org.jbpm.graph.def.ActionHandler;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.util.CollectionUtil;
+
+/**
+ * @author Alejandro Guizar
+ */
+public class EsbActionHandler implements ActionHandler {
+
+  private String esbCategoryName;
+  private String esbServiceName;
+  private Element bpmToEsbVars;
+  private Element esbToBpmVars;
+
+  private static final long serialVersionUID = 1L;
+  private static final Log log = LogFactory.getLog(EsbActionHandler.class);
+
+  public void execute(ExecutionContext executionContext) throws Exception {
+    log.debug("simulating invocation of " + esbCategoryName + "::" + esbServiceName);
+    for (Element bpmToEsbVar : CollectionUtil.checkList(bpmToEsbVars.elements(), Element.class)) {
+      String var = bpmToEsbVar.attributeValue("bpm");
+      Object value = executionContext.getVariable(var);
+      log.debug("read " + value + " from variable " + var);
+    }
+    Random random = new Random();
+    for (Element esbToBpmVar : CollectionUtil.checkList(esbToBpmVars.elements(), Element.class)) {
+      String var = esbToBpmVar.attributeValue("bpm");
+      byte[] value = new byte[random.nextInt(2048)];
+      random.nextBytes(value);
+      executionContext.setVariable(var, value);
+      log.debug("wrote " + value.length + " bytes to variable " + var);
+    }
+    executionContext.leaveNode();
+  }
+
+}

Deleted: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/JBPM2094Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm2094/JBPM2094Test.java	2009-04-01 02:02:46 UTC (rev 4371)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/JBPM2094Test.java	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.jbpm2094;
-
-import org.jbpm.db.AbstractDbTestCase;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.ProcessInstance;
-
-/**
- * Unindexed foreign keys cause deadlocks in oracle.
- * 
- * @see <a href="https://jira.jboss.org/jira/browse/JBPM-2094">JBPM-2094</a>
- * @author Alejandro Guizar
- */
-public class JBPM2094Test extends AbstractDbTestCase {
-
-  private static final int TIMEOUT = 60 * 1000;
-  private static final int INSTANCE_COUNT = 5;
-
-  @Override
-  protected void setUp() throws Exception {
-    super.setUp();
-    getJbpmConfiguration().getJobExecutor().setNbrOfThreads(4);
-  }
-
-  @Override
-  protected void tearDown() throws Exception {
-    jbpmConfiguration.getJobExecutor().setNbrOfThreads(1);
-    super.tearDown();
-  }
-
-  public void testJobExecutorDeadlock() {
-    // Won't fix [JBPM-2094] unindexed foreign keys cause deadlocks in oracle
-    if (getHibernateDialect().contains("HSQL")) return;
-
-    ProcessDefinition processDefinition = ProcessDefinition
-        .parseXmlResource("org/jbpm/jbpm2094/processdefinition.xml");
-    jbpmContext.deployProcessDefinition(processDefinition);
-
-    newTransaction();
-    try {
-      long[] processInstanceIds = new long[INSTANCE_COUNT];
-      for (int i = 0; i < INSTANCE_COUNT; i++) {
-        ProcessInstance processInstance = new ProcessInstance(processDefinition);
-        processInstance.getContextInstance().setVariable("theBody", "conkersbadfurday".getBytes());
-        processInstance.signal();
-        jbpmContext.save(processInstance);
-        processInstanceIds[i] = processInstance.getId();
-
-        newTransaction();
-      }
-
-      processJobs(TIMEOUT);
-
-      for (int i = 0; i < INSTANCE_COUNT; i++) {
-        ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceIds[i]);
-        assertTrue("expected " + processInstance + " to have ended", processInstance.hasEnded());
-      }
-    }
-    finally {
-      graphSession.deleteProcessDefinition(processDefinition.getId());
-    }
-  }
-}

Copied: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/JBPM2094Test.java (from rev 4371, jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm2094/JBPM2094Test.java)
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/JBPM2094Test.java	                        (rev 0)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm2094/JBPM2094Test.java	2009-04-02 22:50:29 UTC (rev 4398)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.jbpm2094;
+
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Unindexed foreign keys cause deadlocks in oracle.
+ * 
+ * @see <a href="https://jira.jboss.org/jira/browse/JBPM-2094">JBPM-2094</a>
+ * @author Alejandro Guizar
+ */
+public class JBPM2094Test extends AbstractDbTestCase {
+
+  private static final int TIMEOUT = 60 * 1000;
+  private static final int INSTANCE_COUNT = 5;
+
+  @Override
+  protected void setUp() throws Exception {
+    super.setUp();
+    getJbpmConfiguration().getJobExecutor().setNbrOfThreads(4);
+  }
+
+  @Override
+  protected void tearDown() throws Exception {
+    jbpmConfiguration.getJobExecutor().setNbrOfThreads(1);
+    super.tearDown();
+  }
+
+  public void testJobExecutorDeadlock() {
+    // Won't fix [JBPM-2094] unindexed foreign keys cause deadlocks in oracle
+    if (getHibernateDialect().contains("HSQL")) return;
+
+    ProcessDefinition processDefinition = ProcessDefinition
+        .parseXmlResource("org/jbpm/jbpm2094/processdefinition.xml");
+    jbpmContext.deployProcessDefinition(processDefinition);
+
+    newTransaction();
+    try {
+      long[] processInstanceIds = new long[INSTANCE_COUNT];
+      for (int i = 0; i < INSTANCE_COUNT; i++) {
+        ProcessInstance processInstance = new ProcessInstance(processDefinition);
+        processInstance.getContextInstance().setVariable("theBody", "conkersbadfurday".getBytes());
+        processInstance.signal();
+        jbpmContext.save(processInstance);
+        processInstanceIds[i] = processInstance.getId();
+
+        newTransaction();
+      }
+
+      processJobs(TIMEOUT);
+
+      for (int i = 0; i < INSTANCE_COUNT; i++) {
+        ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceIds[i]);
+        assertTrue("expected " + processInstance + " to have ended", processInstance.hasEnded());
+      }
+    }
+    finally {
+      graphSession.deleteProcessDefinition(processDefinition.getId());
+    }
+  }
+}

Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm983/JBPM983Test.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm983/JBPM983Test.java	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm983/JBPM983Test.java	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,6 +1,6 @@
 package org.jbpm.jbpm983;
 
-import java.util.HashMap;
+import java.util.Collections;
 import java.util.Map;
 
 import org.apache.commons.logging.Log;
@@ -12,10 +12,9 @@
 import org.jbpm.graph.exe.ProcessInstance;
 
 /**
- * Concurrent process execution fails
+ * Concurrent process execution fails.
  * 
- * https://jira.jboss.org/jira/browse/JBPM-983
- * 
+ * @see <a href="https://jira.jboss.org/jira/browse/JBPM-983">JBPM-983</a>
  * @author Tom Baeyens
  */
 public class JBPM983Test extends AbstractDbTestCase {
@@ -38,7 +37,7 @@
 
     newTransaction();
 
-    getJbpmConfiguration().getJobExecutor().setNbrOfThreads(5);
+    getJbpmConfiguration().getJobExecutor().setNbrOfThreads(4);
     startJobExecutor();
   }
 
@@ -47,12 +46,12 @@
     getJbpmConfiguration().getJobExecutor().setNbrOfThreads(1);
 
     graphSession.deleteProcessDefinition(processDefinitionId);
-    graphSession.deleteProcessDefinition(subProcessDefinitionId);      
+    graphSession.deleteProcessDefinition(subProcessDefinitionId);
 
     super.tearDown();
   }
 
-  static String SUBPROCESS_XML = "<?xml version='1.0' encoding='UTF-8'?>"
+  static final String SUBPROCESS_XML = "<?xml version='1.0' encoding='UTF-8'?>"
       + "<process-definition xmlns='urn:jbpm.org:jpdl-3.2' name='subprocess'>"
       + "<start-state name='start-state1'>"
       + "   <description>start of the process</description>"
@@ -80,7 +79,7 @@
       + "</end-state>"
       + "</process-definition>";
 
-  static String PROCESS_XML = "<?xml version='1.0' encoding='UTF-8'?>"
+  static final String PROCESS_XML = "<?xml version='1.0' encoding='UTF-8'?>"
       + "<process-definition xmlns='urn:jbpm.org:jpdl-3.2' name='superprocess'>"
       + "<start-state name='start-state1'>"
       + "   <description>start of the process</description>"
@@ -119,17 +118,12 @@
       + "</end-state>"
       + "</process-definition>";
 
-  public void testConcurrentJobs() throws Exception 
-  {
+  public void testConcurrentJobs() throws Exception {
     // Won't Fix [JBPM-983] concurrent process execution fails
-    if (getHibernateDialect().indexOf("HSQL") != -1) 
-    {
-      return;
-    }
-    
+    if (getHibernateDialect().contains("HSQL")) return;
+
     // create test properties
-    Map testVariables = new HashMap();
-    testVariables.put("test", "true");
+    Map testVariables = Collections.singletonMap("test", "true");
 
     final int processCount = 10;
     long[] processInstanceIds = new long[processCount];
@@ -138,6 +132,7 @@
       processInstance.getContextInstance().addVariables(testVariables);
       processInstance.signal();
       processInstanceIds[i] = processInstance.getId();
+
       newTransaction();
     }
 
@@ -156,7 +151,7 @@
     final int endTimeout = 30;
     long startTime = System.currentTimeMillis();
 
-    while(!jbpmContext.loadProcessInstance(piId).hasEnded()) {
+    while (!jbpmContext.loadProcessInstance(piId).hasEnded()) {
       if (System.currentTimeMillis() - startTime > endTimeout * 1000) {
         fail("Aborting after " + endTimeout + " seconds.");
         break;

Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java	2009-04-02 22:50:29 UTC (rev 4398)
@@ -25,7 +25,7 @@
   @Override
   protected void setUp() throws Exception {
     super.setUp();
-    getJbpmConfiguration().getJobExecutor().setNbrOfThreads(5);
+    getJbpmConfiguration().getJobExecutor().setNbrOfThreads(4);
   }
 
   @Override
@@ -97,7 +97,6 @@
         + "  </node>"
         + "  <end-state name='end'/>"
         + "</process-definition>");
-
     jbpmContext.deployProcessDefinition(processDefinition);
     newTransaction();
   }
@@ -160,7 +159,8 @@
   }
 
   static synchronized String getProcessIndex(Long id) {
-    if (allocatedProcessIds.contains(id) == false) allocatedProcessIds.add(id);
+    if (allocatedProcessIds.contains(id) == false)
+      allocatedProcessIds.add(id);
 
     int procIndex = allocatedProcessIds.indexOf(id);
     String prefix = (procIndex < 10 ? "0" : "");

Modified: jbpm3/trunk/modules/core/src/test/resources/log4j.xml
===================================================================
--- jbpm3/trunk/modules/core/src/test/resources/log4j.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/core/src/test/resources/log4j.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -8,14 +8,14 @@
   <!-- ================================= -->
 
   <appender name="FILE" class="org.apache.log4j.FileAppender">
-    <param name="File" value="${log4j.output.dir}/test.log"/>
-    <param name="Append" value="false"/>
+    <param name="File" value="${log4j.output.dir}/test.log" />
+    <param name="Append" value="false" />
     <layout class="org.apache.log4j.PatternLayout">
       <!-- The default pattern: Date Priority [Category] Message\n -->
-      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p (%t) [%c] %m%n" />
     </layout>
   </appender>
-  
+
   <!-- ============================== -->
   <!-- Append messages to the console -->
   <!-- ============================== -->
@@ -24,7 +24,7 @@
     <param name="Target" value="System.out" />
     <param name="Threshold" value="INFO" />
     <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n" />
+      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n" />
     </layout>
   </appender>
 
@@ -42,7 +42,7 @@
   </category>
   -->
 
-  <!-- hide proxy narrowing warns -->
+  <!-- hide proxy narrowing warnings -->
   <category name="org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog">
     <priority value="ERROR" />
   </category>
@@ -65,7 +65,7 @@
 
   <root>
     <!--appender-ref ref="CONSOLE"/-->
-    <appender-ref ref="FILE"/>
+    <appender-ref ref="FILE" />
   </root>
 
 </log4j:configuration>

Copied: jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094 (from rev 4371, jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/resources/org/jbpm/jbpm2094)

Deleted: jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml	2009-04-01 02:02:46 UTC (rev 4371)
+++ jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<root-container name="processDefinition1" width="806" height="809">
-  <node name="start" x="181" y="26" width="132" height="36">
-    <edge>
-      <label x="5" y="-10"/>
-    </edge>
-  </node>
-  <node name="Receive Order" x="350" y="26" width="132" height="36">
-    <edge>
-      <label x="5" y="-10"/>
-    </edge>
-  </node>
-  <node name="Validate Order" x="350" y="89" width="132" height="36">
-    <edge>
-      <label x="5" y="-10"/>
-    </edge>
-  </node>
-  <node name="fork1" x="117" y="224" width="252" height="24">
-    <edge>
-      <label x="-65" y="-8"/>
-    </edge>
-    <edge>
-      <label x="-107" y="-14"/>
-    </edge>
-    <edge>
-      <label x="21" y="-11"/>
-    </edge>
-  </node>
-  <node name="Los Angeles WHSE" x="178" y="298" width="132" height="36">
-    <edge>
-      <label x="5" y="-10"/>
-    </edge>
-  </node>
-  <node name="Dallas WHSE" x="22" y="300" width="132" height="36">
-    <edge>
-      <label x="5" y="-10"/>
-    </edge>
-  </node>
-  <node name="Atlanta WHSE" x="325" y="295" width="132" height="36">
-    <edge>
-      <label x="5" y="-10"/>
-    </edge>
-  </node>
-  <node name="join1" x="118" y="386" width="252" height="24">
-    <edge>
-      <label x="5" y="-10"/>
-    </edge>
-  </node>
-  <node name="Shipment Notice" x="177" y="442" width="132" height="36">
-    <edge>
-      <label x="5" y="-10"/>
-    </edge>
-  </node>
-  <node name="end1" x="176" y="511" width="132" height="36"/>
-  <node name="Credit Check" x="178" y="88" width="132" height="36">
-    <edge>
-      <label x="5" y="-10"/>
-    </edge>
-  </node>
-  <node name="Inventory Check" x="177" y="154" width="132" height="36">
-    <edge>
-      <label x="5" y="-10"/>
-    </edge>
-  </node>
-</root-container>

Copied: jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml (from rev 4371, jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml)
===================================================================
--- jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml	                        (rev 0)
+++ jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="processDefinition1" width="806" height="809">
+  <node name="start" x="181" y="26" width="132" height="36">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="Receive Order" x="350" y="26" width="132" height="36">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="Validate Order" x="350" y="89" width="132" height="36">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="fork1" x="117" y="224" width="252" height="24">
+    <edge>
+      <label x="-65" y="-8"/>
+    </edge>
+    <edge>
+      <label x="-107" y="-14"/>
+    </edge>
+    <edge>
+      <label x="21" y="-11"/>
+    </edge>
+  </node>
+  <node name="Los Angeles WHSE" x="178" y="298" width="132" height="36">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="Dallas WHSE" x="22" y="300" width="132" height="36">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="Atlanta WHSE" x="325" y="295" width="132" height="36">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="join1" x="118" y="386" width="252" height="24">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="Shipment Notice" x="177" y="442" width="132" height="36">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="end1" x="176" y="511" width="132" height="36"/>
+  <node name="Credit Check" x="178" y="88" width="132" height="36">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="Inventory Check" x="177" y="154" width="132" height="36">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+</root-container>

Deleted: jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml	2009-04-01 02:02:46 UTC (rev 4371)
+++ jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="processDefinition1">
-
-  <start-state name="start">
-    <transition name="" to="Receive Order"/>
-  </start-state>
-
-  <node async="true" name="Receive Order">
-    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
-      <esbCategoryName>BPM_Orchestration2_Service1</esbCategoryName>
-      <esbServiceName>Service1</esbServiceName>
-      <bpmToEsbVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </bpmToEsbVars>
-      <esbToBpmVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </esbToBpmVars>
-    </action>
-    <transition to="Validate Order"/>
-  </node>
-
-  <node async="true" name="Validate Order">
-    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
-      <esbCategoryName>BPM_Orchestration2_Service2</esbCategoryName>
-      <esbServiceName>Service2</esbServiceName>
-      <bpmToEsbVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </bpmToEsbVars>
-      <esbToBpmVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </esbToBpmVars>
-    </action>
-    <transition to="Credit Check"/>
-  </node>
-
-  <fork name="fork1">
-    <transition to="Los Angeles WHSE" name="to Los Angeles WHSE"/>
-    <transition to="Dallas WHSE" name="to Dallas WHSE"/>
-    <transition name="to Atlanta WHSE" to="Atlanta WHSE"/>
-  </fork>
-
-  <node async="true" name="Los Angeles WHSE">
-    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
-      <esbCategoryName>BPM_Orchestration2_Service5</esbCategoryName>
-      <esbServiceName>Service5</esbServiceName>
-      <bpmToEsbVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </bpmToEsbVars>
-      <esbToBpmVars>
-        <mapping bpm="la" esb="BODY_CONTENT" />
-      </esbToBpmVars>
-    </action>
-    <transition name="" to="join1"/>
-  </node>
-
-  <node async="true" name="Dallas WHSE">
-    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
-      <esbCategoryName>BPM_Orchestration2_Service6</esbCategoryName>
-      <esbServiceName>Service6</esbServiceName>
-      <bpmToEsbVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </bpmToEsbVars>
-      <esbToBpmVars>
-        <mapping bpm="dallas" esb="BODY_CONTENT" />
-      </esbToBpmVars>
-    </action>
-    <transition name="" to="join1"/>
-  </node>
-
-  <node async="true" name="Atlanta WHSE">
-
-    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
-      <esbCategoryName>BPM_Orchestration2_Service7</esbCategoryName>
-      <esbServiceName>Service7</esbServiceName>
-      <bpmToEsbVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </bpmToEsbVars>
-      <esbToBpmVars>
-        <mapping bpm="atlanta" esb="BODY_CONTENT" />
-      </esbToBpmVars>
-    </action>
-    <transition name="" to="join1"/>
-  </node>
-
-  <join name="join1">
-    <transition to="Shipment Notice"/>
-  </join>
-
-  <node async="true" name="Shipment Notice">
-    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
-      <esbCategoryName>BPM_Orchestration2_ResultsService
-      </esbCategoryName>
-      <esbServiceName>ResultsService</esbServiceName>
-      <bpmToEsbVars>
-        <mapping bpm="atlanta" esb="atlanta" />
-        <mapping bpm="la" esb="la" />
-        <mapping bpm="dallas" esb="dallas" />
-      </bpmToEsbVars>
-      <esbToBpmVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </esbToBpmVars>
-    </action>
-    <transition name="" to="end1"/>
-  </node>
-
-  <end-state name="end1"/>
-
-  <node async="true" name="Credit Check">
-    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
-      <esbCategoryName>BPM_Orchestration2_Service3</esbCategoryName>
-      <esbServiceName>Service3</esbServiceName>
-      <bpmToEsbVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </bpmToEsbVars>
-      <esbToBpmVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </esbToBpmVars>
-    </action>
-    <transition to="Inventory Check"/>
-  </node>
-
-  <node async="true" name="Inventory Check">
-    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
-      <esbCategoryName>BPM_Orchestration2_Service4</esbCategoryName>
-      <esbServiceName>Service4</esbServiceName>
-      <bpmToEsbVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </bpmToEsbVars>
-      <esbToBpmVars>
-        <mapping bpm="theBody" esb="BODY_CONTENT" />
-      </esbToBpmVars>
-    </action>
-    <transition to="fork1"/>
-  </node>
-
-</process-definition>

Copied: jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml (from rev 4371, jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml)
===================================================================
--- jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml	                        (rev 0)
+++ jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="processDefinition1">
+
+  <start-state name="start">
+    <transition name="" to="Receive Order"/>
+  </start-state>
+
+  <node async="true" name="Receive Order">
+    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
+      <esbCategoryName>BPM_Orchestration2_Service1</esbCategoryName>
+      <esbServiceName>Service1</esbServiceName>
+      <bpmToEsbVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </bpmToEsbVars>
+      <esbToBpmVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </esbToBpmVars>
+    </action>
+    <transition to="Validate Order"/>
+  </node>
+
+  <node async="true" name="Validate Order">
+    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
+      <esbCategoryName>BPM_Orchestration2_Service2</esbCategoryName>
+      <esbServiceName>Service2</esbServiceName>
+      <bpmToEsbVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </bpmToEsbVars>
+      <esbToBpmVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </esbToBpmVars>
+    </action>
+    <transition to="Credit Check"/>
+  </node>
+
+  <fork name="fork1">
+    <transition to="Los Angeles WHSE" name="to Los Angeles WHSE"/>
+    <transition to="Dallas WHSE" name="to Dallas WHSE"/>
+    <transition name="to Atlanta WHSE" to="Atlanta WHSE"/>
+  </fork>
+
+  <node async="true" name="Los Angeles WHSE">
+    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
+      <esbCategoryName>BPM_Orchestration2_Service5</esbCategoryName>
+      <esbServiceName>Service5</esbServiceName>
+      <bpmToEsbVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </bpmToEsbVars>
+      <esbToBpmVars>
+        <mapping bpm="la" esb="BODY_CONTENT" />
+      </esbToBpmVars>
+    </action>
+    <transition name="" to="join1"/>
+  </node>
+
+  <node async="true" name="Dallas WHSE">
+    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
+      <esbCategoryName>BPM_Orchestration2_Service6</esbCategoryName>
+      <esbServiceName>Service6</esbServiceName>
+      <bpmToEsbVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </bpmToEsbVars>
+      <esbToBpmVars>
+        <mapping bpm="dallas" esb="BODY_CONTENT" />
+      </esbToBpmVars>
+    </action>
+    <transition name="" to="join1"/>
+  </node>
+
+  <node async="true" name="Atlanta WHSE">
+
+    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
+      <esbCategoryName>BPM_Orchestration2_Service7</esbCategoryName>
+      <esbServiceName>Service7</esbServiceName>
+      <bpmToEsbVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </bpmToEsbVars>
+      <esbToBpmVars>
+        <mapping bpm="atlanta" esb="BODY_CONTENT" />
+      </esbToBpmVars>
+    </action>
+    <transition name="" to="join1"/>
+  </node>
+
+  <join name="join1">
+    <transition to="Shipment Notice"/>
+  </join>
+
+  <node async="true" name="Shipment Notice">
+    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
+      <esbCategoryName>BPM_Orchestration2_ResultsService
+      </esbCategoryName>
+      <esbServiceName>ResultsService</esbServiceName>
+      <bpmToEsbVars>
+        <mapping bpm="atlanta" esb="atlanta" />
+        <mapping bpm="la" esb="la" />
+        <mapping bpm="dallas" esb="dallas" />
+      </bpmToEsbVars>
+      <esbToBpmVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </esbToBpmVars>
+    </action>
+    <transition name="" to="end1"/>
+  </node>
+
+  <end-state name="end1"/>
+
+  <node async="true" name="Credit Check">
+    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
+      <esbCategoryName>BPM_Orchestration2_Service3</esbCategoryName>
+      <esbServiceName>Service3</esbServiceName>
+      <bpmToEsbVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </bpmToEsbVars>
+      <esbToBpmVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </esbToBpmVars>
+    </action>
+    <transition to="Inventory Check"/>
+  </node>
+
+  <node async="true" name="Inventory Check">
+    <action name="esbAction" class="org.jbpm.jbpm2094.EsbActionHandler">
+      <esbCategoryName>BPM_Orchestration2_Service4</esbCategoryName>
+      <esbServiceName>Service4</esbServiceName>
+      <bpmToEsbVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </bpmToEsbVars>
+      <esbToBpmVars>
+        <mapping bpm="theBody" esb="BODY_CONTENT" />
+      </esbToBpmVars>
+    </action>
+    <transition to="fork1"/>
+  </node>
+
+</process-definition>

Modified: jbpm3/trunk/modules/db/pom.xml
===================================================================
--- jbpm3/trunk/modules/db/pom.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/db/pom.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -70,10 +70,17 @@
     	<scope>runtime</scope>
     </dependency>
     <dependency>
-      <groupId>net.sourceforge.jtds</groupId>
-      <artifactId>jtds</artifactId>
-      <scope>runtime</scope>
+    	<groupId>com.sybase</groupId>
+    	<artifactId>jconnect</artifactId>
+    	<version>${jconnect.version}</version>
+    	<scope>runtime</scope>
     </dependency>
+    <dependency>
+    	<groupId>com.oracle</groupId>
+    	<artifactId>ojdbc14</artifactId>
+    	<version>${ojdbc.version}</version>
+    	<scope>runtime</scope>
+    </dependency>
   </dependencies>
 
   <!-- Plugins -->

Modified: jbpm3/trunk/modules/db/scripts/antrun-jbpmschema.xml
===================================================================
--- jbpm3/trunk/modules/db/scripts/antrun-jbpmschema.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/db/scripts/antrun-jbpmschema.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -49,7 +49,8 @@
   
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.mysql.update322.sql" config="hibernate.cfg.mysql.xml" properties="mysql.properties" action="update" delimiter=";"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.postgresql.update322.sql" config="hibernate.cfg.postgresql.xml" properties="postgresql.properties" action="update" delimiter=";"/>
-    <jbpmschema output="${scriptsdir}/jbpm.jpdl.sybase.update322.sql" config="hibernate.cfg.sybase.xml" properties="sybase.properties" action="update" delimiter=";"/>
+    <jbpmschema output="${scriptsdir}/jbpm.jpdl.sybase.update322.sql" config="hibernate.cfg.sybase.xml" properties="sybase.properties" action="update" />
+  	<jbpmschema output="${scriptsdir}/jbpm.jpdl.oracle.update322.sql" config="hibernate.cfg.oracle.xml" properties="oracle.properties" action="update" delimiter=";"/>
    
   </target>
   

Copied: jbpm3/trunk/modules/db/src/main/resources/oracle.properties (from rev 4371, jbpm3/branches/jbpm-3.2.5.SP/modules/db/src/main/resources/oracle.properties)
===================================================================
--- jbpm3/trunk/modules/db/src/main/resources/oracle.properties	                        (rev 0)
+++ jbpm3/trunk/modules/db/src/main/resources/oracle.properties	2009-04-02 22:50:29 UTC (rev 4398)
@@ -0,0 +1,8 @@
+hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
+#
+# This uses the jbpm322 database schema as reference for the SchemaUpdate task
+#
+hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
+hibernate.connection.url=jdbc:oracle:thin:@${jdbc.oracle.server}:${jdbc.oracle.port}:jbpm322
+hibernate.connection.username=${jdbc.oracle.username}
+hibernate.connection.password=${jdbc.oracle.password}

Modified: jbpm3/trunk/modules/db/src/main/resources/postgresql.properties
===================================================================
--- jbpm3/trunk/modules/db/src/main/resources/postgresql.properties	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/db/src/main/resources/postgresql.properties	2009-04-02 22:50:29 UTC (rev 4398)
@@ -3,6 +3,6 @@
 # This uses the jbpm322 database schema as reference for the SchemaUpdate task
 #
 hibernate.connection.driver_class=org.postgresql.Driver
-hibernate.connection.url=jdbc\:postgresql\://${jdbc.postgresql.server}\:${jdbc.postgresql.port}/jbpm322
+hibernate.connection.url=jdbc:postgresql://${jdbc.postgresql.server}:${jdbc.postgresql.port}/jbpm322
 hibernate.connection.username=${jdbc.postgresql.username}
 hibernate.connection.password=${jdbc.postgresql.password}

Modified: jbpm3/trunk/modules/db/src/main/resources/sybase.properties
===================================================================
--- jbpm3/trunk/modules/db/src/main/resources/sybase.properties	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/db/src/main/resources/sybase.properties	2009-04-02 22:50:29 UTC (rev 4398)
@@ -2,7 +2,7 @@
 #
 # This uses the jbpm322 database schema as reference for the SchemaUpdate task
 #
-hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver
-hibernate.connection.url=jdbc:jtds:sybase://${jdbc.sybase.server}:${jdbc.sybase.port}/jbpm322
+hibernate.connection.driver_class=${jdbc.sybase.driver}
+hibernate.connection.url=jdbc:sybase:Tds:${jdbc.sybase.server}:${jdbc.sybase.port}/jbpm322
 hibernate.connection.username=${jdbc.sybase.username}
 hibernate.connection.password=${jdbc.sybase.password}

Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/distribution/pom.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -171,10 +171,6 @@
       <groupId>postgresql</groupId>
       <artifactId>postgresql</artifactId>
     </dependency>
-    <dependency>
-      <groupId>net.sourceforge.jtds</groupId>
-      <artifactId>jtds</artifactId>
-    </dependency>
   </dependencies>
 
   <!-- Plugins -->

Modified: jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -88,6 +88,12 @@
     <macro-enable file="${sybase.cfg.xml}" section="DataSource properties"/>
     <macro-enable file="${sybase.cfg.xml}" section="JTA transaction properties"/>
 
+    <property name="oracle.cfg.xml" value="${deploy.artifacts.resources}/jbpm-jpdl-config/hibernate.cfg.oracle.xml"/>
+    <macro-disable file="${oracle.cfg.xml}" section="JDBC connection properties"/>
+    <macro-disable file="${oracle.cfg.xml}" section="Automatic schema creation"/>
+    <macro-enable file="${oracle.cfg.xml}" section="DataSource properties"/>
+    <macro-enable file="${oracle.cfg.xml}" section="JTA transaction properties"/>
+
     <condition property="database.is.hsqldb" value="true" else="false">
       <equals arg1="${database}" arg2="hsqldb"/>
     </condition>
@@ -100,6 +106,9 @@
     <condition property="database.is.sybase" value="true" else="false">
       <equals arg1="${database}" arg2="sybase"/>
     </condition>
+    <condition property="database.is.oracle" value="true" else="false">
+      <equals arg1="${database}" arg2="oracle"/>
+    </condition>
 
   </target>
 
@@ -116,6 +125,7 @@
         <filter token="database.is.mysql" value="${database.is.mysql}" />
         <filter token="database.is.postgresql" value="${database.is.postgresql}" />
       	<filter token="database.is.sybase" value="${database.is.sybase}" />
+      	<filter token="database.is.oracle" value="${database.is.oracle}" />
         <filter token="jbpm.target.container" value="${jbpm.target.container}" />
         <filter token="jboss.home" value="${jboss.home}" />
         <filter token="product.version" value="${product.version}" />

Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -83,6 +83,10 @@
       <name>dbSelection</name>
       <value>sybase</value>
     </condition>
+    <condition type="variable" id="isOracle">
+      <name>dbSelection</name>
+      <value>oracle</value>
+    </condition>
   </conditions>
 
   <!-- Panels -->
@@ -220,13 +224,15 @@
         <include name="hibernate.cfg.mysql.xml"/>
         <include name="hibernate.cfg.postgresql.xml"/>
         <include name="hibernate.cfg.sybase.xml"/>
+        <include name="hibernate.cfg.oracle.xml"/>
         <include name="jbpm-hsqldb-ds.xml"/>
         <include name="jbpm-mysql-ds.xml"/>
         <include name="jbpm-postgresql-ds.xml"/>
         <include name="jbpm-sybase-ds.xml"/>
+        <include name="jbpm-oracle-ds.xml"/>
       </fileset>
       
-      <!-- Database Hypsersonic -->
+      <!-- Database Hypersonic -->
       <file src="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config/jbpm-hsqldb-ds.xml" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm" condition="isHypersonic"/>
       <singlefile src="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config/hibernate.cfg.hsqldb.xml" condition="isHypersonic" 
         target="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml" />
@@ -254,9 +260,11 @@
       <file src="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config/jbpm-sybase-ds.xml" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm" condition="isSybase"/>
       <singlefile src="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config/hibernate.cfg.sybase.xml" condition="isSybase" 
         target="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml" />
-      <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true" condition="isSybase">
-        <include name="jtds.jar" />
-      </fileset>
+
+      <!-- Database Oracle -->
+      <file src="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config/jbpm-oracle-ds.xml" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm" condition="isOracle"/>
+      <singlefile src="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config/hibernate.cfg.oracle.xml" condition="isOracle" 
+        target="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml" />
     </pack>
 
     <!-- 

Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/user-input-spec.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/user-input-spec.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/user-input-spec.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -18,10 +18,11 @@
     <field type="radio" variable="dbSelection">
       <description align="left" txt="Please choose your target database" />
       <spec>
-        <choice txt="Hypersonic" value="hsqldb"/>
-        <choice txt="MySQL" value="mysql" set="true"/>
+        <choice txt="Hypersonic" value="hsqldb" set="true"/>
+        <choice txt="MySQL" value="mysql"/>
         <choice txt="PostgreSQL" value="postgresql"/>
         <choice txt="Sybase" value="sybase"/>
+        <choice txt="Oracle" value="oracle"/>
       </spec>
     </field>
   </panel>

Modified: jbpm3/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/pom.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/enterprise/pom.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,15 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-  <!-- ====================================================================== -->
-  <!--                                                                        -->
-  <!--  JBoss, the OpenSource J2EE webOS                                      -->
-  <!--                                                                        -->
-  <!--  Distributable under LGPL license.                                     -->
-  <!--  See terms of license at http://www.gnu.org.                           -->
-  <!--                                                                        -->
-  <!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!--                                                                        -->
+<!--  JBoss, the OpenSource J2EE webOS                                      -->
+<!--                                                                        -->
+<!--  Distributable under LGPL license.                                     -->
+<!--  See terms of license at http://www.gnu.org.                           -->
+<!--                                                                        -->
+<!-- ====================================================================== -->
 
-  <!-- $Id$ -->
+<!-- $Id$ -->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
@@ -30,7 +31,7 @@
   <properties>
     <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/resources/tst.policy</surefire.security.args>
   </properties>
-  
+
   <!-- Dependencies -->
   <dependencies>
     <!-- jBPM Dependencies -->
@@ -210,7 +211,7 @@
         </plugins>
       </build>
     </profile>
-    
+
     <!-- 
     Name:  no-database
     Descr: Setup the default database   
@@ -351,5 +352,29 @@
         </plugins>
       </build>
     </profile>
+
+    <!-- 
+    Name:  oracle
+    Descr: Oracle Database Setup   
+    -->
+    <profile>
+      <id>oracle</id>
+      <activation>
+        <property>
+          <name>database</name>
+          <value>oracle</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+          </plugin>
+        </plugins>
+      </build>
+      <dependencies>
+      </dependencies>
+    </profile>
+
   </profiles>
 </project>

Modified: jbpm3/trunk/modules/userguide/pom.xml
===================================================================
--- jbpm3/trunk/modules/userguide/pom.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/modules/userguide/pom.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -41,6 +41,7 @@
       <plugin>
         <groupId>org.jboss.maven.plugins</groupId>
         <artifactId>maven-jdocbook-plugin</artifactId>
+        <version>${jdocbook.version}</version>
         <extensions>true</extensions>
         <configuration>
           <sourceDocumentName>en/master.xml</sourceDocumentName>

Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml	2009-04-02 21:06:11 UTC (rev 4397)
+++ jbpm3/trunk/pom.xml	2009-04-02 22:50:29 UTC (rev 4398)
@@ -1,22 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-  <!-- ====================================================================== -->
-  <!--                                                                        -->
-  <!--  JBoss, the OpenSource J2EE webOS                                      -->
-  <!--                                                                        -->
-  <!--  Distributable under LGPL license.                                     -->
-  <!--  See terms of license at http://www.gnu.org.                           -->
-  <!--                                                                        -->
-  <!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!--                                                                        -->
+<!--  JBoss, the OpenSource J2EE webOS                                      -->
+<!--                                                                        -->
+<!--  Distributable under LGPL license.                                     -->
+<!--  See terms of license at http://www.gnu.org.                           -->
+<!--                                                                        -->
+<!-- ====================================================================== -->
 
-  <!-- $Id: pom.xml 7412 2008-06-06 13:42:30Z thomas.diesler at jboss.com $ -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!-- $Id: pom.xml 7412 2008-06-06 13:42:30Z thomas.diesler at jboss.com $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <name>JBoss jBPM3</name>
   <groupId>org.jbpm.jbpm3</groupId>
   <artifactId>jbpm</artifactId>
   <packaging>pom</packaging>
-  
   <version>3.2.7-SNAPSHOT</version>
   <url>http://www.jboss.org/jbossjbpm/</url>
 
@@ -35,7 +36,7 @@
     <module>modules/examples</module>
     <module>modules/simulation</module>
 
-    <!--  Execute as part of -Pdistro 
+    <!-- Execute as part of -Pdistro
     <module>modules/db</module>
     <module>modules/userguide</module>
     -->
@@ -77,6 +78,7 @@
     <jboss.client.version>4.2.2.GA</jboss.client.version>
     <jboss.gravel.version>1.0.0.GA</jboss.gravel.version>
     <jboss.seam.version>2.0.2.GA</jboss.seam.version>
+    <jdocbook.version>2.1.2</jdocbook.version>
     <junit.version>3.8.1</junit.version>
     <oscache.version>2.4</oscache.version>
     <poi.version>3.0.2-FINAL</poi.version>
@@ -91,7 +93,7 @@
     <postgresql.version>8.3-603.jdbc3</postgresql.version>
     <jtds.version>1.2.2</jtds.version>
     <jconnect.version>6.0.5</jconnect.version>
-    <ojdbc.version>10.0.2.0</ojdbc.version>
+    <ojdbc.version>10.2.0.4</ojdbc.version>
   </properties>
 
   <!-- DependencyManagement -->
@@ -127,7 +129,7 @@
       <!-- BPM Spec Dependencies-->
       <dependency>
         <groupId>org.jboss.bpm</groupId>
-       <artifactId>bpm-spec-api</artifactId>
+        <artifactId>bpm-spec-api</artifactId>
         <version>${bpm.spec.version}</version>
       </dependency>
 
@@ -391,11 +393,6 @@
         <artifactId>postgresql</artifactId>
         <version>${postgresql.version}</version>
       </dependency>
-      <dependency>
-        <groupId>net.sourceforge.jtds</groupId>
-        <artifactId>jtds</artifactId>
-        <version>${jtds.version}</version>
-      </dependency>
     </dependencies>
   </dependencyManagement>
 
@@ -430,6 +427,15 @@
 
   <!-- Plugins -->
   <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.jboss.maven.plugins</groupId>
+          <artifactId>maven-jdocbook-plugin</artifactId>
+          <version>${jdocbook.version}</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
     <plugins>
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
@@ -467,7 +473,7 @@
           <plugin>
             <artifactId>maven-javadoc-plugin</artifactId>
             <configuration>
-              <quite>true</quite>
+              <quiet>true</quiet>
             </configuration>
             <executions>
               <execution>




More information about the jbpm-commits mailing list