diff --git a/source/java/org/alfresco/repo/workflow/jbpm/JBPMEngineUnitTest.java b/source/java/org/alfresco/repo/workflow/jbpm/JBPMEngineUnitTest.java
index f9c0e6dec0..c2c05c3e71 100644
--- a/source/java/org/alfresco/repo/workflow/jbpm/JBPMEngineUnitTest.java
+++ b/source/java/org/alfresco/repo/workflow/jbpm/JBPMEngineUnitTest.java
@@ -86,8 +86,8 @@ public class JBPMEngineUnitTest extends TestCase
private static final NodeRef companyHome = new NodeRef("for://test/home");
private static final ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(
- new String[] { "classpath:test/alfresco/test-database-context.xml",
- "classpath:test/alfresco/test-workflow-context.xml", });
+ new String[] { "classpath:jbpm-test/test-database-context.xml",
+ "classpath:jbpm-test/test-workflow-context.xml", });
private JBPMEngine engine = new JBPMEngine();
diff --git a/source/test-resources/jbpm-test/jbpm.cfg.xml b/source/test-resources/jbpm-test/jbpm.cfg.xml
new file mode 100644
index 0000000000..ef9e57ff75
--- /dev/null
+++ b/source/test-resources/jbpm-test/jbpm.cfg.xml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/test-resources/jbpm-test/test-context.xml b/source/test-resources/jbpm-test/test-context.xml
new file mode 100644
index 0000000000..68e5910710
--- /dev/null
+++ b/source/test-resources/jbpm-test/test-context.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+ ${db.name}_test
+ ${db.url}_test
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/test-resources/jbpm-test/test-database-context.xml b/source/test-resources/jbpm-test/test-database-context.xml
new file mode 100644
index 0000000000..eec24f0b02
--- /dev/null
+++ b/source/test-resources/jbpm-test/test-database-context.xml
@@ -0,0 +1,219 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ classpath:jbpm-test/test-hibernate-cfg.properties
+
+
+
+ true
+
+
+
+
+
+
+ ${db.driver}
+
+
+ ${db.testurl}
+
+
+ ${db.username}
+
+
+ ${db.password}
+
+
+ ${db.pool.initial}
+
+
+ ${db.pool.max}
+
+
+ ${db.pool.min}
+
+
+ ${db.pool.idle}
+
+
+ false
+
+
+ ${db.txn.isolation}
+
+
+ ${db.pool.wait.max}
+
+
+ ${db.pool.validate.query}
+
+
+ ${db.pool.evict.interval}
+
+
+ ${db.pool.evict.idle.min}
+
+
+ ${db.pool.validate.borrow}
+
+
+ ${db.pool.validate.return}
+
+
+ ${db.pool.evict.validate}
+
+
+ ${db.pool.abandoned.detect}
+
+
+ ${db.pool.abandoned.time}
+
+
+ ${db.pool.statements.enable}
+
+
+ ${db.pool.statements.max}
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ org/jbpm/graph/action/Script.hbm.xml
+ org/jbpm/db/hibernate.queries.hbm.xml
+ org/jbpm/graph/def/ProcessDefinition.hbm.xml
+ org/jbpm/graph/def/Node.hbm.xml
+ org/jbpm/graph/def/Transition.hbm.xml
+ org/jbpm/graph/def/Event.hbm.xml
+ org/jbpm/graph/def/Action.hbm.xml
+ org/jbpm/graph/def/SuperState.hbm.xml
+ org/jbpm/graph/def/ExceptionHandler.hbm.xml
+ org/jbpm/instantiation/Delegation.hbm.xml
+ org/jbpm/graph/node/StartState.hbm.xml
+ org/jbpm/graph/node/EndState.hbm.xml
+ org/jbpm/graph/node/ProcessState.hbm.xml
+ org/jbpm/graph/node/Decision.hbm.xml
+ org/jbpm/graph/node/Fork.hbm.xml
+ org/alfresco/repo/workflow/jbpm/jbpm.Join.hbm.xml
+ org/jbpm/graph/node/State.hbm.xml
+ org/jbpm/graph/node/TaskNode.hbm.xml
+ org/jbpm/context/def/ContextDefinition.hbm.xml
+ org/jbpm/context/def/VariableAccess.hbm.xml
+ org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml
+ org/jbpm/taskmgmt/def/Swimlane.hbm.xml
+ org/jbpm/taskmgmt/def/Task.hbm.xml
+ org/jbpm/taskmgmt/def/TaskController.hbm.xml
+ org/jbpm/module/def/ModuleDefinition.hbm.xml
+ org/jbpm/bytes/ByteArray.hbm.xml
+ org/jbpm/file/def/FileDefinition.hbm.xml
+ org/alfresco/repo/workflow/jbpm/jbpm.CreateTimerAction.hbm.xml
+ org/jbpm/scheduler/def/CancelTimerAction.hbm.xml
+ org/jbpm/graph/exe/Comment.hbm.xml
+ org/jbpm/graph/exe/ProcessInstance.hbm.xml
+ org/jbpm/graph/exe/Token.hbm.xml
+ org/jbpm/graph/exe/RuntimeAction.hbm.xml
+ org/jbpm/module/exe/ModuleInstance.hbm.xml
+ org/jbpm/context/exe/ContextInstance.hbm.xml
+ org/jbpm/context/exe/TokenVariableMap.hbm.xml
+ org/jbpm/context/exe/VariableInstance.hbm.xml
+ org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml
+ org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml
+ org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml
+ org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml
+ org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml
+ org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml
+ org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml
+ org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml
+ org/jbpm/job/Job.hbm.xml
+ org/jbpm/job/Timer.hbm.xml
+ org/alfresco/repo/workflow/jbpm/jbpm.Timer.hbm.xml
+ org/jbpm/job/ExecuteNodeJob.hbm.xml
+ org/jbpm/job/ExecuteActionJob.hbm.xml
+ org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml
+ org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml
+ org/alfresco/repo/workflow/jbpm/WorkflowTaskInstance.hbm.xml
+ org/jbpm/taskmgmt/exe/PooledActor.hbm.xml
+ org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml
+ org/jbpm/logging/log/ProcessLog.hbm.xml
+ org/jbpm/logging/log/MessageLog.hbm.xml
+ org/jbpm/logging/log/CompositeLog.hbm.xml
+ org/jbpm/graph/log/ActionLog.hbm.xml
+ org/jbpm/graph/log/NodeLog.hbm.xml
+ org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml
+ org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml
+ org/jbpm/graph/log/ProcessStateLog.hbm.xml
+ org/jbpm/graph/log/SignalLog.hbm.xml
+ org/jbpm/graph/log/TokenCreateLog.hbm.xml
+ org/jbpm/graph/log/TokenEndLog.hbm.xml
+ org/jbpm/graph/log/TransitionLog.hbm.xml
+ org/jbpm/context/log/VariableLog.hbm.xml
+ org/jbpm/context/log/VariableCreateLog.hbm.xml
+ org/jbpm/context/log/VariableDeleteLog.hbm.xml
+ org/jbpm/context/log/VariableUpdateLog.hbm.xml
+ org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml
+ org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml
+ org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml
+ org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml
+ org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml
+ org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml
+ org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml
+ org/jbpm/taskmgmt/log/TaskLog.hbm.xml
+ org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml
+ org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml
+ org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml
+ org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml
+ org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml
+ org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml
+ org/jbpm/job/CleanUpProcessJob.hbm.xml
+
+
+
+
+
+
+
+
+ SYNCHRONIZATION_ALWAYS
+
+
+
+
+
+
+
diff --git a/source/test-resources/jbpm-test/test-hibernate-cfg.properties b/source/test-resources/jbpm-test/test-hibernate-cfg.properties
new file mode 100644
index 0000000000..c22bdc7d69
--- /dev/null
+++ b/source/test-resources/jbpm-test/test-hibernate-cfg.properties
@@ -0,0 +1,28 @@
+#
+# Hibernate configuration
+#
+
+# The Hibernate Dialect:
+# As of V3.1, the dialect is automatically detected.
+# It is still possible to set the dialect explicitly, for example:
+hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
+hibernate.hbm2ddl.auto=update
+hibernate.jdbc.use_streams_for_binary=true
+hibernate.show_sql=false
+hibernate.cache.use_query_cache=true
+hibernate.max_fetch_depth=10
+hibernate.cache.provider_class=org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean
+hibernate.cache.use_second_level_cache=true
+hibernate.default_batch_fetch_size=1
+hibernate.jdbc.batch_size=32
+hibernate.connection.release_mode=auto
+hibernate.connection.isolation=2
+
+#hibernate.query.substitutions=
+#hibernate.jdbc.use_get_generated_keys=false
+
+# Oracle Schema Distinction:
+# See https://issues.alfresco.com/jira/browse/ETHREEOH-680
+# Metadata queries to Oracle have to be limited by schema name
+# when multiple instances of Alfresco are installed on an Oracle server.
+#hibernate.default_schema=
diff --git a/source/test-resources/jbpm-test/test-workflow-context.xml b/source/test-resources/jbpm-test/test-workflow-context.xml
new file mode 100644
index 0000000000..ae4f5e6202
--- /dev/null
+++ b/source/test-resources/jbpm-test/test-workflow-context.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+