[jbpm-commits] JBoss JBPM SVN: r4383 - in jbpm4/trunk: modules/api/src/main/java/org/jbpm and 39 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Apr 1 16:47:29 EDT 2009


Author: heiko.braun at jboss.com
Date: 2009-04-01 16:47:29 -0400 (Wed, 01 Apr 2009)
New Revision: 4383

Added:
   jbpm4/trunk/modules/examples/scripts/
   jbpm4/trunk/modules/examples/scripts/antrun-test-jars.xml
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/expression/Order.java
   jbpm4/trunk/modules/examples/src/test/resources/jndi.properties
   jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/
   jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/ArchiveDeployer.java
   jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/IntegrationTestHelper.java
   jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/IntegrationTestSetup.java
   jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/JBossArchiveDeployer.java
   jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/ObjectNameFactory.java
   jbpm4/trunk/modules/test-base/test-base.iml
Removed:
   jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/ArchiveDeployer.java
   jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/IntegrationTestHelper.java
   jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/IntegrationTestSetup.java
   jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/JBossArchiveDeployer.java
   jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/ObjectNameFactory.java
   jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java
Modified:
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java
   jbpm4/trunk/modules/db/jbpm4-db.iml
   jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml
   jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml
   jbpm4/trunk/modules/enterprise/pom.xml
   jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java
   jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/DeployerTestCase.java
   jbpm4/trunk/modules/examples/jbpm4-examples.iml
   jbpm4/trunk/modules/examples/pom.xml
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/concurrency/graphbased/ConcurrencyGraphBasedTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/multiple/EndMultipleTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/processinstance/EndProcessInstanceTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/state/EndStateTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/esb/EsbTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/conditions/ExclusiveConditionsTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/expression/ExclusiveExpressionTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/handler/ExclusiveHandlerTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/java/JavaInstantiateTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/expression/ScriptExpressionTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/text/ScriptTextTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/state/choice/StateChoiceTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/state/sequence/StateSequenceTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignee/TaskAssigneeTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignmenthandler/TaskAssignmentHandlerTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/candidates/TaskCandidatesTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/swimlane/TaskSwimlaneTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/variables/TaskVariablesTest.java
   jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/expression/process.jpdl.xml
   jbpm4/trunk/modules/integration/console/integration-console.iml
   jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml
   jbpm4/trunk/modules/integration/spi/integration-spi.iml
   jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java
   jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java
   jbpm4/trunk/modules/test-db/jbpm4-test-db.iml
   jbpm4/trunk/pom.xml
Log:
Begin work on JBPM-2030: Integration test suite. modules/examples done.

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -21,17 +21,14 @@
  */
 package org.jbpm;
 
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import org.jbpm.model.Comment;
-import org.jbpm.task.GroupRef;
-import org.jbpm.task.IdentityRef;
 import org.jbpm.task.Participation;
 import org.jbpm.task.Task;
-import org.jbpm.task.UserRef;
 
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 /**
  * Human task management facility.
  * @author Alejandro Guizar

Modified: jbpm4/trunk/modules/db/jbpm4-db.iml
===================================================================
--- jbpm4/trunk/modules/db/jbpm4-db.iml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/db/jbpm4-db.iml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -9,10 +9,9 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="toplevel" />
-    <orderEntry type="module" module-name="pvm" />
-    <orderEntry type="module" module-name="jpdl" />
     <orderEntry type="module" module-name="api" />
+    <orderEntry type="module" module-name="pvm" />
+    <orderEntry type="module" module-name="toplevel" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: junit:junit:jar:3.8.1:compile">
         <CLASSES>
@@ -368,14 +367,12 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: javax.transaction:jta:jar:1.1:compile">
+      <library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar!/" />
         </CLASSES>
         <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1-sources.jar!/" />
-        </SOURCES>
+        <SOURCES />
       </library>
     </orderEntry>
     <orderEntryProperties />

Modified: jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -149,11 +149,7 @@
 
       <description>The Install jBPM in JBoss</description>
 
-      <!-- jbpm/jbpm-service.sar , console  config-->
-      <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-console-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
-        <include name="jbpm-users.properties"/>
-        <include name="jbpm-roles.properties"/>
-      </fileset>
+      <!-- jbpm/jbpm-service.sar , console  config-->      
       <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-console-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar/META-INF" override="true">
         <include name="jboss-service.xml"/>
       </fileset>

Modified: jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml
===================================================================
--- jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -11,492 +11,8 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="gwt-server-integration" exported="" />
-    <orderEntry type="module" module-name="toplevel" exported="" />
-    <orderEntry type="module" module-name="pvm" exported="" />
-    <orderEntry type="module" module-name="gwt-rpc" exported="" />
-    <orderEntry type="module" module-name="api" exported="" />
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: cargo:cargo:jar:0.5:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/cargo/cargo/0.5/cargo-0.5.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: cactus:cactus:jar:13-1.7.1:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/cactus/cactus/13-1.7.1/cactus-13-1.7.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: nekohtml:nekohtml:jar:0.9.1:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/nekohtml/nekohtml/0.9.1/nekohtml-0.9.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/nekohtml/nekohtml/0.9.1/nekohtml-0.9.1-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: xerces:xercesImpl:jar:2.6.2:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: aspectj:aspectjrt:jar:1.2.1:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/aspectj/aspectjrt/1.2.1/aspectjrt-1.2.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: jboss:jboss-j2ee:jar:4.2.2.GA:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jboss/jboss-j2ee/4.2.2.GA/jboss-j2ee-4.2.2.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: commons-httpclient:commons-httpclient:jar:2.0.2:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: cactus:cactus-ant:jar:13-1.7.1:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/cactus/cactus-ant/13-1.7.1/cactus-ant-13-1.7.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: rhino:js:jar:1.5R4.1:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/rhino/js/1.5R4.1/js-1.5R4.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/rhino/js/1.5R4.1/js-1.5R4.1-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: ant:ant:jar:1.5.4:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/ant/ant/1.5.4/ant-1.5.4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: jtidy:jtidy:jar:4aug2000r7-dev:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: httpunit:httpunit:jar:1.6:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/httpunit/httpunit/1.6/httpunit-1.6.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/httpunit/httpunit/1.6/httpunit-1.6-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: xerces:xmlParserAPIs:jar:2.2.1:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/xerces/xmlParserAPIs/2.2.1/xmlParserAPIs-2.2.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: junit:junit:jar:3.8.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.hibernate:hibernate:jar:3.2.6.ga:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: antlr:antlr:jar:2.7.6:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: asm:asm:jar:1.5.3:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: net.sf.ehcache:ehcache:jar:1.2.3:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.livetribe:livetribe-jsr223:jar:2.0.5:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/livetribe/livetribe-jsr223/2.0.5/livetribe-jsr223-2.0.5.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: dom4j:dom4j:jar:1.6.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: cglib:cglib:jar:2.1_3:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: asm:asm-attrs:jar:1.5.3:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: commons-collections:commons-collections:jar:2.1.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: log4j:log4j:jar:1.2.14:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: commons-logging:commons-logging:jar:1.0.4:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: juel:juel-engine:jar:2.1.0:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/juel/juel-engine/2.1.0/juel-engine-2.1.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: juel:juel:jar:2.1.0:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/juel/juel/2.1.0/juel-2.1.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: juel:juel-impl:jar:2.1.0:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/juel/juel-impl/2.1.0/juel-impl-2.1.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.identity:idm-spi:jar:1.0.0-SNAPSHOT:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/identity/idm-spi/1.0.0-SNAPSHOT/idm-spi-1.0.0-SNAPSHOT.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.hibernate:hibernate-commons-annotations:jar:3.0.0.ga:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/hibernate-commons-annotations/3.0.0.ga/hibernate-commons-annotations-3.0.0.ga.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.cache:jbosscache-core:jar:3.0.2.GA:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/cache/jbosscache-core/3.0.2.GA/jbosscache-core-3.0.2.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.identity:idm-api:jar:1.0.0-SNAPSHOT:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/identity/idm-api/1.0.0-SNAPSHOT/idm-api-1.0.0-SNAPSHOT.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.identity:idm:jar:1.0.0-SNAPSHOT:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/identity/idm/1.0.0-SNAPSHOT/idm-1.0.0-SNAPSHOT.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.hibernate:ejb3-persistence:jar:1.0.1.GA:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/ejb3-persistence/1.0.1.GA/ejb3-persistence-1.0.1.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: com.sun.xml.bind:jaxb-impl:jar:2.1.8:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.8/jaxb-impl-2.1.8.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.hibernate:hibernate-entitymanager:jar:3.3.2.GA:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/hibernate-entitymanager/3.3.2.GA/hibernate-entitymanager-3.3.2.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: javax.servlet:servlet-api:jar:2.5:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: javassist:javassist:jar:3.4.GA:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javassist/javassist/3.4.GA/javassist-3.4.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: javax.persistence:persistence-api:jar:1.0:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.identity:idm-common:jar:1.0.0-SNAPSHOT:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/identity/idm-common/1.0.0-SNAPSHOT/idm-common-1.0.0-SNAPSHOT.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: jgroups:jgroups:jar:2.6.7.GA:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jgroups/jgroups/2.6.7.GA/jgroups-2.6.7.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jgroups/jgroups/2.6.7.GA/jgroups-2.6.7.GA-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: javax.activation:activation:jar:1.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.hibernate:hibernate-annotations:jar:3.3.1.GA:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/hibernate-annotations/3.3.1.GA/hibernate-annotations-3.3.1.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss:jboss-common-core:jar:2.2.10.GA:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: javax.transaction:jta:jar:1.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.client:jbossall-client:jar:5.0.0.GA:runtime">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/client/jbossall-client/5.0.0.GA/jbossall-client-5.0.0.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:provided">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
+    <orderEntry type="module" module-name="gwt-parent" />
+    <orderEntry type="module" module-name="toplevel" />
     <orderEntryProperties />
   </component>
 </module>

Modified: jbpm4/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm4/trunk/modules/enterprise/pom.xml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/enterprise/pom.xml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -39,13 +39,25 @@
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-pvm</artifactId>
       <version>${version}</version>
-    </dependency>    
+    </dependency>
     <dependency>
+      <groupId>org.jbpm.jbpm4</groupId>
+      <artifactId>jbpm-test-base</artifactId>
+      <version>${version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.jboss.bpm</groupId>
       <artifactId>gwt-console-server-integration</artifactId>
       <scope>compile</scope>
     </dependency>
+    <dependency>
+      <groupId>jboss</groupId>
+      <artifactId>jboss-j2ee</artifactId>
+      <scope>provided</scope>
+    </dependency>
 
+
     <!-- Test Dependencies -->
     <dependency>
       <groupId>cactus</groupId>
@@ -53,10 +65,17 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.jboss.client</groupId>
-      <artifactId>jbossall-client</artifactId>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-client</artifactId>
+      <type>pom</type>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.javaee</groupId>
+      <artifactId>jboss-javaee</artifactId>
       <scope>runtime</scope>
     </dependency>
+
   </dependencies>
 
   <!-- Plugins -->
@@ -68,7 +87,7 @@
         <filtering>true</filtering>
       </resource>
     </resources>
-    
+
     <testResources>
       <testResource>
         <directory>src/test/resources</directory>
@@ -83,7 +102,7 @@
         <configuration>
           <excludes>
             <exclude>jbpm.cfg.xml</exclude>
-            <exclude>jbpm-destinations-service.xml</exclude>          
+            <exclude>jbpm-destinations-service.xml</exclude>
           </excludes>
         </configuration>
       </plugin>

Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -52,17 +52,10 @@
     this.jndiName = jndiName;
   }
 
-  public <T> T execute(Command<T> command) {
-
-    Properties env = new Properties();
-    env.put(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
-    env.put(Context.PROVIDER_URL, providerUrl);
-    env.put(Context.URL_PKG_PREFIXES, urlPkgPrefixes);
-    
-    try {
-      log.debug("creating initial context with env "+env);
-      InitialContext initialContext = new InitialContext(env);
-      log.debug("looking up "+jndiName);
+  public <T> T execute(Command<T> command) {    
+    try
+    {
+      InitialContext initialContext = new InitialContext();      
       RemoteCommandExecutorHome remoteCommandExecutorHome = (RemoteCommandExecutorHome) initialContext.lookup(jndiName);
       RemoteCommandExecutor remoteCommandExecutor = remoteCommandExecutorHome.create();
       Object result = remoteCommandExecutor.execute(command);

Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/DeployerTestCase.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/DeployerTestCase.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/DeployerTestCase.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -44,7 +44,7 @@
 
   protected void tearDown() throws Exception
   {    
-    testHelper.undeploy(new String[]{TEST_WAR, TEST_JAR}, true);
+    testHelper.undeploy(new String[]{TEST_WAR, TEST_JAR});
   }
 
   public void testDeploymentExists()

Deleted: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/ArchiveDeployer.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/ArchiveDeployer.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/ArchiveDeployer.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -1,42 +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.test.enterprise;
-
-import java.net.URL;
-
-/**
- * An archive deployer
- * 
- * @author Thomas.Diesler at jboss.org
- * @since 16-May-2006
- */
-public interface ArchiveDeployer {
-  /**
-   * Deploy the given archive
-   */
-  void deploy(URL archive) throws Exception;
-
-  /**
-   * Undeploy the given archive
-   */
-  void undeploy(URL archive) throws Exception;
-}

Deleted: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/IntegrationTestHelper.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/IntegrationTestHelper.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/IntegrationTestHelper.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -1,226 +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.test.enterprise;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Hashtable;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-/**
- * An integration test helper that deals with test deployment/undeployment, etc.
- * 
- * @author Thomas.Diesler at jboss.org
- * @since 14-Oct-2004
- */
-public class IntegrationTestHelper {
-  private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
-  private static final String SYSPROP_TEST_ARCHIVE_DIRECTORY = "test.archive.directory";
-
-  private static String testResourcesDir;
-  private static String testArchiveDir;
-
-  private static MBeanServerConnection server;
-  private String integrationTarget;
-
-  public void deploy(String[] archives) throws Exception {
-    for(String archive : archives)
-    {
-      deploy(archive);
-    }
-  }
-
-  public void deploy(String archive) throws Exception {
-    URL url = getTestArchiveFile(archive).toURI().toURL();
-    deploy(url);
-  }
-
-  public void deploy(URL archive) throws Exception {
-    getDeployer().deploy(archive);
-  }
-
-  public void undeploy(String[] archives, boolean delete) throws Exception
-  {
-    for(String archive : archives)
-    {
-      undeploy(archive, delete);
-    }
-  }
-
-  public void undeploy(String[] archives) throws Exception
-  {
-    for(String archive : archives)
-    {
-      undeploy(archive);
-    }
-  }
-
-  public void undeploy(String archive) throws Exception {
-    undeploy(archive, false);
-  }
-
-  public void undeploy(String archive, boolean deleteArchive) throws Exception {
-    File testArchiveFile = getTestArchiveFile(archive);
-    URL url = testArchiveFile.toURI().toURL();
-
-    if(deleteArchive)
-    {
-      // if not deleted the JBPMDeployer retains the process definition ;)
-      testArchiveFile.delete();  
-    }
-
-    undeploy(url);
-  }
-
-  public void undeploy(URL archive) throws Exception {
-    getDeployer().undeploy(archive);
-  }
-
-  public boolean isTargetJBoss500() {
-    String target = getIntegrationTarget();
-    return target.startsWith("jboss500");
-  }
-
-  public boolean isTargetJBoss423() {
-    String target = getIntegrationTarget();
-    return target.startsWith("jboss423");
-  }
-
-  public boolean isTargetJBoss422() {
-    String target = getIntegrationTarget();
-    return target.startsWith("jboss422");
-  }
-
-  private String getIntegrationTarget() {
-    if (integrationTarget == null) {
-      String jbossVersion;
-      try {
-        ObjectName oname = ObjectNameFactory
-            .create("jboss.system:type=ServerConfig");
-        jbossVersion = (String) getServer().getAttribute(oname,
-            "SpecificationVersion");
-      } catch (Exception ex) {
-        throw new IllegalStateException("Cannot obtain jboss version", ex);
-      }
-
-      if (jbossVersion.startsWith("5.0.0"))
-        integrationTarget = "jboss500";
-      else if (jbossVersion.startsWith("4.2.3"))
-        integrationTarget = "jboss423";
-      else if (jbossVersion.startsWith("4.2.2"))
-        integrationTarget = "jboss422";
-      else
-        throw new IllegalStateException("Unsupported jboss version: "
-            + jbossVersion);
-    }
-    return integrationTarget;
-  }
-
-  public MBeanServerConnection getServer() {
-    if (server == null) {
-      Hashtable jndiEnv = null;
-      try {
-        InitialContext iniCtx = new InitialContext();
-        jndiEnv = iniCtx.getEnvironment();
-        server = (MBeanServerConnection) iniCtx
-            .lookup("jmx/invoker/RMIAdaptor");
-      } catch (NamingException ex) {
-        throw new RuntimeException(
-            "Cannot obtain MBeanServerConnection using jndi props: " + jndiEnv,
-            ex);
-      }
-    }
-    return server;
-  }
-
-  private ArchiveDeployer getDeployer() {
-    return new JBossArchiveDeployer(getServer());
-  }
-
-  /** Try to discover the URL for the test resource */
-  public URL getResourceURL(String resource) {
-    URL resURL = null;
-    try {
-      File resourceFile = getResourceFile(resource);
-      resURL = resourceFile.toURI().toURL();
-    } catch (MalformedURLException e) {
-      // ignore
-    }
-    return resURL;
-  }
-
-  /** Try to discover the File for the test resource */
-  public File getResourceFile(String resource) {
-    File file = new File(resource);
-    if (file.exists())
-      return file;
-
-    file = new File(getTestResourcesDir() + "/" + resource);
-    if (file.exists())
-      return file;
-
-    throw new IllegalArgumentException("Cannot obtain '"
-        + getTestResourcesDir() + "/" + resource + "'");
-  }
-
-  public String getTestResourcesDir() {
-    if (testResourcesDir == null) {
-      testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY,
-          "target/test-classes");
-    }
-    return testResourcesDir;
-  }
-
-  /** Try to discover the URL for the deployment archive */
-  public URL getTestArchiveURL(String archive) throws MalformedURLException {
-    return getTestArchiveFile(archive).toURI().toURL();
-  }
-
-  /** Try to discover the File for the deployment archive */
-  public File getTestArchiveFile(String archive) {
-    File file = new File(archive);
-    if (file.exists())
-      return file;
-
-    file = new File(getTestArchiveDir() + "/" + archive);
-    if (file.exists())
-      return file;
-
-    String notSet = getTestArchiveDir() == null ? " System property '"
-        + SYSPROP_TEST_ARCHIVE_DIRECTORY + "' not set." : "";
-    throw new IllegalArgumentException("Cannot obtain '" + getTestArchiveDir()
-        + "/" + archive + "'." + notSet);
-  }
-
-  public String getTestArchiveDir() {
-    if (testArchiveDir == null) {
-      testArchiveDir = System.getProperty(SYSPROP_TEST_ARCHIVE_DIRECTORY,
-          "target/test-libs");
-    }
-    return testArchiveDir;
-  }
-}

Deleted: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/IntegrationTestSetup.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/IntegrationTestSetup.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/IntegrationTestSetup.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -1,127 +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.test.enterprise;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.management.MBeanServerConnection;
-
-import junit.extensions.TestSetup;
-import junit.framework.TestSuite;
-
-import org.jbpm.internal.log.Log;
-
-/**
- * A test setup that deploys/undeploys archives
- * 
- * @author Thomas.Diesler at jboss.org
- * @since 14-Oct-2004
- */
-public class IntegrationTestSetup extends TestSetup {
-  private IntegrationTestHelper delegate = new IntegrationTestHelper();
-  private String[] archives;
-  private ClassLoader originalClassLoader;
-
-  private static final Log log = Log.getLog(IntegrationTestSetup.class
-      .getName());
-
-  public IntegrationTestSetup(Class<?> testClass, String... archiveList) {
-    super(new TestSuite(testClass));
-    archives = archiveList != null ? archiveList : new String[0];
-  }
-
-  public File getArchiveFile(String archive) {
-    return delegate.getTestArchiveFile(archive);
-  }
-
-  public URL getArchiveURL(String archive) throws MalformedURLException {
-    return delegate.getTestArchiveFile(archive).toURI().toURL();
-  }
-
-  public boolean isTargetJBoss500() {
-    return delegate.isTargetJBoss500();
-  }
-
-  public boolean isTargetJBoss423() {
-    return delegate.isTargetJBoss423();
-  }
-
-  public boolean isTargetJBoss422() {
-    return delegate.isTargetJBoss422();
-  }
-
-  public MBeanServerConnection getServer() {
-    return delegate.getServer();
-  }
-
-  @Override
-  protected void setUp() throws Exception {
-    log.debug("### START SETUP " + getTest());
-
-    List<URL> clientJars = new ArrayList<URL>();
-    for (int i = 0; i < archives.length; i++) {
-      String archive = archives[i];
-      try {
-        delegate.deploy(archive);
-      } catch (Exception ex) {
-        ex.printStackTrace();
-        delegate.undeploy(archive);
-      }
-
-      if (archive.endsWith("-client.jar")) {
-        URL archiveURL = getArchiveURL(archive);
-        clientJars.add(archiveURL);
-      }
-    }
-
-    ClassLoader parent = Thread.currentThread().getContextClassLoader();
-    originalClassLoader = parent;
-
-    // add client jars to the class loader
-    if (!clientJars.isEmpty()) {
-      URL[] urls = new URL[clientJars.size()];
-      for (int i = 0; i < clientJars.size(); i++) {
-        urls[i] = clientJars.get(i);
-      }
-      URLClassLoader cl = new URLClassLoader(urls, parent);
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  @Override
-  protected void tearDown() throws Exception {
-    try {
-      for (int i = 0; i < archives.length; i++) {
-        String archive = archives[archives.length - i - 1];
-        delegate.undeploy(archive);
-      }
-    } finally {
-      Thread.currentThread().setContextClassLoader(originalClassLoader);
-    }
-    log.debug("### END SETUP " + getTest());
-  }
-}

Deleted: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/JBossArchiveDeployer.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/JBossArchiveDeployer.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/JBossArchiveDeployer.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -1,56 +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.test.enterprise;
-
-import java.net.URL;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-
-/**
- * An archive deployer that deals with test deployment/undeployment, etc.
- * 
- * @author Thomas.Diesler at jboss.org
- * @since 14-Oct-2004
- */
-public class JBossArchiveDeployer implements ArchiveDeployer {
-  private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
-
-  private MBeanServerConnection server;
-
-  public JBossArchiveDeployer(MBeanServerConnection server) {
-    this.server = server;
-  }
-
-  public void deploy(URL url) throws Exception {
-    invokeMainDeployer("deploy", url);
-  }
-
-  public void undeploy(URL url) throws Exception {
-    invokeMainDeployer("undeploy", url);
-  }
-
-  private void invokeMainDeployer(String methodName, URL url) throws Exception {
-    server.invoke(new ObjectName(MAIN_DEPLOYER), methodName,
-        new Object[] { url }, new String[] { "java.net.URL" });
-  }
-}

Deleted: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/ObjectNameFactory.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/ObjectNameFactory.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/ObjectNameFactory.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -1,61 +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.test.enterprise;
-
-import java.util.Hashtable;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-/**
- * A simple factory for creating safe object names.
- * 
- * @author Thomas.Diesler at jboss.org
- * @since 08-May-2006
- */
-public class ObjectNameFactory {
-  public static ObjectName create(String name) {
-    try {
-      return new ObjectName(name);
-    } catch (MalformedObjectNameException e) {
-      throw new IllegalArgumentException("Invalid ObjectName: " + name, e);
-    }
-  }
-
-  public static ObjectName create(String domain, String key, String value) {
-    try {
-      return new ObjectName(domain, key, value);
-    } catch (MalformedObjectNameException e) {
-      throw new IllegalArgumentException("Invalid ObjectName: " + domain + ","
-          + key + "," + value, e);
-    }
-  }
-
-  public static ObjectName create(String domain, Hashtable<String, String> table) {
-    try {
-      return new ObjectName(domain, table);
-    } catch (MalformedObjectNameException e) {
-      throw new IllegalArgumentException("Invalid ObjectName: " + domain + ","
-          + table, e);
-    }
-  }
-}

Modified: jbpm4/trunk/modules/examples/jbpm4-examples.iml
===================================================================
--- jbpm4/trunk/modules/examples/jbpm4-examples.iml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/jbpm4-examples.iml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -9,10 +9,9 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="toplevel" />
     <orderEntry type="module" module-name="pvm" />
-    <orderEntry type="module" module-name="jpdl" />
     <orderEntry type="module" module-name="api" />
+    <orderEntry type="module" module-name="toplevel" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: jboss:jboss-j2ee:jar:4.2.2.GA:compile">
         <CLASSES>
@@ -301,15 +300,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.client:jbossall-client:jar:5.0.0.GA:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/client/jbossall-client/5.0.0.GA/jbossall-client-5.0.0.GA.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:runtime">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar!/" />
@@ -331,6 +321,15 @@
         </SOURCES>
       </library>
     </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.jboss.client:jbossall-client:jar:4.2.2.GA:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/client/jbossall-client/4.2.2.GA/jbossall-client-4.2.2.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
     <orderEntry type="module-library">
       <library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:test">
         <CLASSES>
@@ -414,6 +413,7 @@
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntry type="module" module-name="test-base" />
     <orderEntryProperties />
   </component>
 </module>

Modified: jbpm4/trunk/modules/examples/pom.xml
===================================================================
--- jbpm4/trunk/modules/examples/pom.xml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/pom.xml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -43,7 +43,13 @@
       <artifactId>jbpm-jpdl</artifactId>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.jbpm.jbpm4</groupId>
+      <artifactId>jbpm-test-base</artifactId>
+      <scope>test</scope>
+    </dependency>
 
+
     <dependency>
       <groupId>org.codehaus.woodstox</groupId>
       <artifactId>wstx-lgpl</artifactId>
@@ -61,14 +67,41 @@
     </dependency>
   </dependencies>
 
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
 
+          <execution>
+            <id>build-test-jars</id>
+            <phase>process-test-classes</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <tasks>
+                <property name="build.dir" value="${project.build.directory}" />
+                <property name="test.resources.dir" value="${build.dir}/test-classes" />
+                <property name="build.finalName" value="${project.build.finalName}" />
+                <ant antfile="scripts/antrun-test-jars.xml" target="build-jars" />
+              </tasks>
+            </configuration>
+          </execution>       
+        </executions>
+      </plugin>
+
+    </plugins>
+  </build>
+
   <profiles>
+    
     <!-- -Ddatabase= -->
     <profile>
-      <id>use.database.directly</id>
+      <id>standalone.tests</id>
       <activation>
         <property>
-          <name>database</name>
+          <name>!jboss.bind.address</name>
         </property>
       </activation>
       <build>
@@ -98,9 +131,9 @@
       </build>
     </profile>
 
-    <!-- -Djboss.bind.address
+    <!-- -Djboss.bind.address -->
     <profile>
-      <id>use.jboss.directly</id>
+      <id>integration.tests</id>
       <activation>
         <property>
           <name>jboss.bind.address</name>
@@ -110,23 +143,47 @@
         <dependency>
           <groupId>org.jbpm.jbpm4</groupId>
           <artifactId>jbpm-enterprise</artifactId>
-          <scope>runtime</scope>
+          <scope>test</scope>
         </dependency>
+
+        <!-- AS 5 Integration tests -->
         <dependency>
-          <groupId>org.jboss.client</groupId>
-          <artifactId>jbossall-client</artifactId>
-          <scope>runtime</scope>
+          <groupId>org.jboss.jbossas</groupId>
+          <artifactId>jboss-as-client</artifactId>
+          <scope>test</scope>
+          <type>pom</type>
         </dependency>
         <dependency>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-j2ee</artifactId>          
+          <groupId>org.jboss.javaee</groupId>
+          <artifactId>jboss-javaee</artifactId>
+          <scope>test</scope>
         </dependency>
+
       </dependencies>
+
+
       <build>
+
+        <resources>
+          <resource>
+            <directory>src/main/resources</directory>
+            <filtering>true</filtering>
+          </resource>
+        </resources>
+
+        <testResources>
+          <testResource>
+            <directory>src/test/resources</directory>
+            <filtering>true</filtering>
+          </testResource>
+        </testResources>
+
         <plugins>
+
           <plugin>
             <artifactId>maven-antrun-plugin</artifactId>
             <executions>
+
               <execution>
                 <phase>test-compile</phase>
                 <goals>
@@ -147,9 +204,10 @@
               </execution>
             </executions>
           </plugin>
+
         </plugins>
       </build>
-    </profile -->
+    </profile>
 
   </profiles>
 

Added: jbpm4/trunk/modules/examples/scripts/antrun-test-jars.xml
===================================================================
--- jbpm4/trunk/modules/examples/scripts/antrun-test-jars.xml	                        (rev 0)
+++ jbpm4/trunk/modules/examples/scripts/antrun-test-jars.xml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -0,0 +1,99 @@
+<?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.                 -->
+<!-- ============================================================ -->
+
+<!-- $Id: antrun-test-jars.xml 4271 2009-03-18 08:27:46Z heiko.braun at jboss.com $ -->
+
+<project>
+
+  <description>Example test archives</description>
+
+  <target name="build-jars" description="Build the test modules.">
+
+    <mkdir dir="${build.dir}/test-libs"/>
+
+    <!-- ConcurrencyGraphBasedTest -->
+    <test-jar name="ConcurrencyGraphBasedTest" pkg="concurrency/graphbased"/>
+
+    <!-- EndMultipleTest -->
+    <test-jar name="EndMultipleTest" pkg="end/multiple"/>
+
+    <!-- EndProcessInstanceTest -->
+    <test-jar name="EndProcessInstanceTest" pkg="end/processinstance"/>   
+
+    <!-- EndStateTest -->
+    <test-jar name="EndStateTest" pkg="end/state"/>
+   
+    <!-- EsbTest -->
+    <test-jar name="EsbTest" pkg="esb"/>
+
+    <!-- ExclusiveConditionsTest -->
+    <test-jar name="ExclusiveConditionsTest" pkg="exclusive/conditions"/>
+
+    <!-- ExclusiveExpressionTest -->
+    <test-jar name="ExclusiveExpressionTest" pkg="exclusive/expression"/>
+
+    <!-- ExclusiveHandlerTest -->
+    <test-jar name="ExclusiveHandlerTest" pkg="exclusive/handler"/>
+
+    <!-- ExclusiveHandlerTest -->
+    <test-jar name="HqlTest" pkg="hql"/>
+
+    <!--  JavaInstantiateTest -->
+    <test-jar name="JavaInstantiateTest" pkg="java"/>
+
+    <!-- ScriptExpressionTest -->
+    <test-jar name="ScriptExpressionTest" pkg="script/expression"/>
+
+    <!--  ScriptTextTest -->
+    <test-jar name="ScriptTextTest" pkg="script/text"/>
+
+    <!--  SqlTest -->
+    <test-jar name="SqlTest" pkg="sql"/>
+
+    <!-- StateChoiceTest -->
+    <test-jar name="StateChoiceTest" pkg="state/choice"/>
+
+    <!-- StateSequenceTest -->
+    <test-jar name="StateSequenceTest" pkg="state/sequence"/>
+
+    <!-- TaskAssigneeTest -->
+    <test-jar name="TaskAssigneeTest" pkg="task/assignee"/>
+
+    <!-- TaskAssignmentHandlerTest -->
+    <test-jar name="TaskAssignmentHandlerTest" pkg="task/assignmenthandler"/>
+
+    <!-- TaskCandidatesTest -->
+    <test-jar name="TaskCandidatesTest" pkg="task/candidates"/>
+
+    <!-- TaskSwimlaneTest -->
+    <test-jar name="TaskSwimlaneTest" pkg="task/swimlane"/>
+
+    <!-- TaskVariablesTest -->
+    <test-jar name="TaskVariablesTest" pkg="task/variables"/>
+
+  </target>
+
+
+  <macrodef name="test-jar">
+    <attribute name="name"/>
+    <attribute name="pkg"/>
+
+    <sequential>      
+      <jar destfile="${build.dir}/test-libs/jbpm-@{name}.jar">
+        <fileset dir="${build.dir}/test-classes">
+          <include name="org/jbpm/examples/@{pkg}/**/*" />
+          <exclude name="**/process.jpdl.xml"/>
+        </fileset>
+        <fileset dir="${build.dir}/test-classes/org/jbpm/examples/@{pkg}/">
+          <include name="process.jpdl.xml" />
+        </fileset>
+      </jar>
+    </sequential>
+  </macrodef>
+
+</project>
\ No newline at end of file

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/concurrency/graphbased/ConcurrencyGraphBasedTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/concurrency/graphbased/ConcurrencyGraphBasedTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/concurrency/graphbased/ConcurrencyGraphBasedTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -33,9 +33,23 @@
  */
 public class ConcurrencyGraphBasedTest extends JbpmTestCase {
 
+
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-ConcurrencyGraphBasedTest.jar");
+
+  }
+
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-ConcurrencyGraphBasedTest.jar");
+    super.tearDown();
+  }
+
   public void testConcurrencyGraphBased() {
-    deployJpdlResource("org/jbpm/examples/concurrency/graphbased/process.jpdl.xml");
-    
+
     Execution processInstance = executionService.startProcessInstanceByKey("ConcurrencyGraphBased");
     String pid = processInstance.getId();
     
@@ -85,7 +99,7 @@
     String driveTruckExecutionId = findExecution(pid, "drive truck to destination").getId();
     executionService.signalExecutionById(driveTruckExecutionId);
 
-    assertNull(executionService.findExecution(pid));
+    assertNull("execution "+pid+" should not exist", executionService.findExecution(pid));
   }
 
 }

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/multiple/EndMultipleTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/multiple/EndMultipleTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/multiple/EndMultipleTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -30,9 +30,20 @@
  */
 public class EndMultipleTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-EndMultipleTest.jar");
+  }
+
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-EndMultipleTest.jar");
+    super.tearDown();
+  }
+
   public void testEndMultipleOk() {
-    deployJpdlResource("org/jbpm/examples/end/multiple/process.jpdl.xml");
-    
     Execution execution = executionService.startProcessInstanceByKey("EndMultiple");
     String executionId = execution.getId();
     execution = executionService.signalExecutionById(executionId, "200");
@@ -41,8 +52,6 @@
   }
 
   public void testEndMultipleBadRequest() {
-    deployJpdlResource("org/jbpm/examples/end/multiple/process.jpdl.xml");
-    
     Execution execution = executionService.startProcessInstanceByKey("EndMultiple");
     String executionId = execution.getId();
     execution = executionService.signalExecutionById(executionId, "400");
@@ -51,7 +60,6 @@
   }
 
   public void testEndMultipleInternalServerError() {
-    deployJpdlResource("org/jbpm/examples/end/multiple/process.jpdl.xml");
     
     Execution execution = executionService.startProcessInstanceByKey("EndMultiple");
     String executionId = execution.getId();

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/processinstance/EndProcessInstanceTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/processinstance/EndProcessInstanceTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/processinstance/EndProcessInstanceTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -30,8 +30,19 @@
  */
 public class EndProcessInstanceTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-EndProcessInstanceTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-EndProcessInstanceTest.jar");
+    super.tearDown();
+  }
+
   public void testEndProcessInstance() {
-    deployJpdlResource("org/jbpm/examples/end/processinstance/process.jpdl.xml");
     
     Execution execution = executionService.startProcessInstanceByKey("EndProcessInstance");
     assertTrue(execution.isEnded());

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/state/EndStateTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/state/EndStateTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/end/state/EndStateTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -28,11 +28,23 @@
 /**
  * @author Tom Baeyens
  */
-public class EndStateTest extends JbpmTestCase {
+public class EndStateTest extends JbpmTestCase
+{
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-EndStateTest.jar");
+  }
+
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-EndStateTest.jar");
+    super.tearDown();
+  }
+
   public void testEndStateCompleted() {
-    deployJpdlResource("org/jbpm/examples/end/state/process.jpdl.xml");
-    
     Execution execution = executionService.startProcessInstanceByKey("EndState");
     String executionId = execution.getId();
     execution = executionService.signalExecutionById(executionId, "200");
@@ -41,8 +53,7 @@
   }
 
   public void testEndStateErrorBadRequest() {
-    deployJpdlResource("org/jbpm/examples/end/state/process.jpdl.xml");
-    
+
     Execution execution = executionService.startProcessInstanceByKey("EndState");
     String executionId = execution.getId();
     execution = executionService.signalExecutionById(executionId, "400");
@@ -51,8 +62,7 @@
   }
 
   public void testEndStateErrorInternalServerError() {
-    deployJpdlResource("org/jbpm/examples/end/state/process.jpdl.xml");
-    
+
     Execution execution = executionService.startProcessInstanceByKey("EndState");
     String executionId = execution.getId();
     execution = executionService.signalExecutionById(executionId, "500");

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/esb/EsbTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/esb/EsbTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/esb/EsbTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -43,17 +43,24 @@
 
   public void setUp() throws Exception {
     super.setUp();
-    
+
     MockCourierFactory.install();
     MockRegistry.install();
     EPR epr = new EPR(new URI("epr"));
     courier = new JbpmMockCourier();
     MockRegistry.register("orderProcessing", "bookSold", epr, courier);
+
+    deploy("jbpm-EsbTest.jar");
   }
 
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-EsbTest.jar");
+    super.tearDown();
+  }
+
   public void testEsb() {
-    deployJpdlResource("org/jbpm/examples/esb/process.jpdl.xml");
-    
+        
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("title", "Internetworking with TCP/IP");
     

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/conditions/ExclusiveConditionsTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/conditions/ExclusiveConditionsTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/conditions/ExclusiveConditionsTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -33,9 +33,20 @@
  */
 public class ExclusiveConditionsTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-ExclusiveConditionsTest.jar");
+
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-ExclusiveConditionsTest.jar");
+    super.tearDown();
+  }
+
   public void testExclusiveConditionsGood() {
-    deployJpdlResource("org/jbpm/examples/exclusive/conditions/process.jpdl.xml");
-    
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("content", "good");
     Execution execution = executionService.startProcessInstanceByKey("ExclusiveConditions", variables);
@@ -43,8 +54,6 @@
   }
 
   public void testExclusiveConditionsBad() {
-    deployJpdlResource("org/jbpm/examples/exclusive/conditions/process.jpdl.xml");
-    
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("content", "bad");
     Execution execution = executionService.startProcessInstanceByKey("ExclusiveConditions", variables);
@@ -52,8 +61,6 @@
   }
 
   public void testExclusiveConditionsUgly() {
-    deployJpdlResource("org/jbpm/examples/exclusive/conditions/process.jpdl.xml");
-    
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("content", "ugly");
     Execution execution = executionService.startProcessInstanceByKey("ExclusiveConditions", variables);

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/expression/ExclusiveExpressionTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/expression/ExclusiveExpressionTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/expression/ExclusiveExpressionTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -33,9 +33,20 @@
  */
 public class ExclusiveExpressionTest extends JbpmTestCase {
 
+   protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-ExclusiveExpressionTest.jar");
+
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-ExclusiveExpressionTest.jar");
+    super.tearDown();
+  }
+
   public void testExclusiveExpressionGood() {
-    deployJpdlResource("org/jbpm/examples/exclusive/expression/process.jpdl.xml");
-    
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("content", "good");
     Execution execution = executionService.startProcessInstanceByKey("ExclusiveExpression", variables);
@@ -43,8 +54,6 @@
   }
 
   public void testExclusiveExpressionBad() {
-    deployJpdlResource("org/jbpm/examples/exclusive/expression/process.jpdl.xml");
-    
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("content", "bad");
     Execution execution = executionService.startProcessInstanceByKey("ExclusiveExpression", variables);
@@ -52,8 +61,6 @@
   }
 
   public void testExclusiveExpressionUgly() {
-    deployJpdlResource("org/jbpm/examples/exclusive/expression/process.jpdl.xml");
-    
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("content", "ugly");
     Execution execution = executionService.startProcessInstanceByKey("ExclusiveExpression", variables);

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/handler/ExclusiveHandlerTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/handler/ExclusiveHandlerTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/exclusive/handler/ExclusiveHandlerTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -30,12 +30,22 @@
 
 /**
  * @author Tom Baeyens
- */
+ */                                  
 public class ExclusiveHandlerTest extends JbpmTestCase {
-  
+
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-ExclusiveHandlerTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-ExclusiveHandlerTest.jar");
+    super.tearDown();
+  }
+
   public void testExclusiveHandlerGreat() {
-    deployJpdlResource("org/jbpm/examples/exclusive/handler/process.jpdl.xml");
-
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("content", "you're great");
     Execution execution = executionService.startProcessInstanceByKey("ExclusiveHandler", variables);
@@ -43,8 +53,6 @@
   }
 
   public void testExclusiveHandlerImprove() {
-    deployJpdlResource("org/jbpm/examples/exclusive/handler/process.jpdl.xml");
-
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("content", "you gotta improve");
     Execution execution = executionService.startProcessInstanceByKey("ExclusiveHandler", variables);
@@ -52,8 +60,6 @@
   }
 
   public void testExclusiveHandlerSuck() {
-    deployJpdlResource("org/jbpm/examples/exclusive/handler/process.jpdl.xml");
-
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("content", "you suck");
     Execution execution = executionService.startProcessInstanceByKey("ExclusiveHandler", variables);

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -35,34 +35,45 @@
  */
 public class HqlTest extends JbpmTestCase {
 
+
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-HqlTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-HqlTest.jar");
+    super.tearDown();
+  }
+
   public void testHql() {
     // add task laundry
     Task task = taskService.newTask();
     task.setName("laundry");
-    taskService.saveTask(task);
-    
+    saveAndRegisterTask(task);
+
     // add task dishes
     task = taskService.newTask();
     task.setName("dishes");
-    taskService.saveTask(task);
-    
+    saveAndRegisterTask(task);
+
     // add task iron
     task = taskService.newTask();
     task.setName("iron");
-    taskService.saveTask(task);
-    
-    deployJpdlResource("org/jbpm/examples/hql/process.jpdl.xml");
-    
+    saveAndRegisterTask(task);
+
     Execution execution = executionService.startProcessInstanceByKey("Hql");
     String executionId = execution.getId();
-    
+
     Set<String> expectedTaskNames = new HashSet<String>();
     expectedTaskNames.add("dishes");
     expectedTaskNames.add("iron");
     Collection<String> taskNames = (Collection<String>) executionService.getVariable(executionId, "tasknames with i");
     taskNames = new HashSet<String>(taskNames);
     assertEquals(expectedTaskNames, taskNames);
-    
+
     Object activities = executionService.getVariable(executionId, "tasks");
     assertEquals("3", activities.toString());
   }

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/java/JavaInstantiateTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/java/JavaInstantiateTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/java/JavaInstantiateTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -30,9 +30,19 @@
  */
 public class JavaInstantiateTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-JavaInstantiateTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-JavaInstantiateTest.jar");
+    super.tearDown();
+  }
+
   public void testJavaInstantiate() {
-    deployJpdlResource("org/jbpm/examples/java/process.jpdl.xml");
-    
     Execution execution = executionService.startProcessInstanceByKey("Java");
     String executionId = execution.getId();
     

Added: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/expression/Order.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/expression/Order.java	                        (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/expression/Order.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.examples.script.expression;
+
+import java.io.Serializable;
+
+
+/**
+ * @author Heiko Braun
+ */
+public class Order implements Serializable
+{
+  private static final long serialVersionUID = 1L;
+
+  String address;
+
+  public Order(String address) {
+    this.address = address;
+  }
+
+  public String getAddress() {
+    return address;
+  }
+
+  public void setAddress(String address) {
+    this.address = address;
+  }
+}
+

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/expression/ScriptExpressionTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/expression/ScriptExpressionTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/expression/ScriptExpressionTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -34,17 +34,29 @@
  */
 public class ScriptExpressionTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-ScriptExpressionTest.jar");
+  }
+
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-ScriptExpressionTest.jar");
+    super.tearDown();
+  }
+
   public void testScriptText() {
-    deployJpdlResource("org/jbpm/examples/script/expression/process.jpdl.xml");
-    
+
     Map<String, Object> variables = new HashMap<String, Object>();
-    variables.put("person", new Person("Honolulu"));
+    variables.put("order", new Order("Berlin"));
     
     Execution execution = executionService.startProcessInstanceByKey("ScriptExpression", variables);
     String executionId = execution.getId();
     
     String text = (String) executionService.getVariable(executionId, "text");
-    assertTextPresent("Send packet to Honolulu", text);
+    assertTextPresent("Send packet to Berlin", text);
   }
 
 }

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/text/ScriptTextTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/text/ScriptTextTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/script/text/ScriptTextTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -33,15 +33,26 @@
  */
 public class ScriptTextTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-ScriptTextTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-ScriptTextTest.jar");
+    super.tearDown();
+  }
+
+
   public void testScriptText() {
-    deployJpdlResource("org/jbpm/examples/script/text/process.jpdl.xml");
-    
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("person", new Person("Honolulu"));
-    
+
     Execution execution = executionService.startProcessInstanceByKey("ScriptText", variables);
     String executionId = execution.getId();
-    
+
     String text = (String) executionService.getVariable(executionId, "text");
     assertTextPresent("Send packet to Honolulu", text);
   }

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -36,24 +36,34 @@
  */
 public class SqlTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-SqlTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-SqlTest.jar");
+    super.tearDown();
+  }
+
   public void testSql() {
     // add task laundry
     Task task = taskService.newTask();
     task.setName("laundry");
-    taskService.saveTask(task);
+    saveAndRegisterTask(task);
     
     // add task dishes
     task = taskService.newTask();
     task.setName("dishes");
-    taskService.saveTask(task);
+    saveAndRegisterTask(task);
     
     // add task iron
     task = taskService.newTask();
     task.setName("iron");
-    taskService.saveTask(task);
+    saveAndRegisterTask(task);
 
-    deployJpdlResource("org/jbpm/examples/sql/process.jpdl.xml");
-    
     Execution execution = executionService.startProcessInstanceByKey("Sql");
     String executionId = execution.getId();
     

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/state/choice/StateChoiceTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/state/choice/StateChoiceTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/state/choice/StateChoiceTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -30,9 +30,19 @@
  */
 public class StateChoiceTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-StateChoiceTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-StateChoiceTest.jar");
+    super.tearDown();
+  }
+
   public void testStateChoiceAccept() {
-    deployJpdlResource("org/jbpm/examples/state/choice/process.jpdl.xml");
-    
     Execution execution = executionService.startProcessInstanceByKey("StateChoice");
     String executionId = execution.getId();
     execution = executionService.signalExecutionById(executionId, "accept");
@@ -40,8 +50,6 @@
   }
 
   public void testStateChoiceReject() {
-    deployJpdlResource("org/jbpm/examples/state/choice/process.jpdl.xml");
-    
     Execution execution = executionService.startProcessInstanceByKey("StateChoice");
     String executionId = execution.getId();
     execution = executionService.signalExecutionById(executionId, "reject");

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/state/sequence/StateSequenceTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/state/sequence/StateSequenceTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/state/sequence/StateSequenceTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -30,9 +30,19 @@
  */
 public class StateSequenceTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-StateSequenceTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-StateSequenceTest.jar");
+    super.tearDown();
+  }
+
   public void testWaitStatesSequence() {
-    deployJpdlResource("org/jbpm/examples/state/sequence/process.jpdl.xml");
-    
     Execution execution = executionService.startProcessInstanceByKey("StateSequence");
     assertEquals("a", execution.getActivityName());
 

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignee/TaskAssigneeTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignee/TaskAssigneeTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignee/TaskAssigneeTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -35,9 +35,19 @@
  */
 public class TaskAssigneeTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-TaskAssigneeTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-TaskAssigneeTest.jar");
+    super.tearDown();
+  }
+
   public void testTaskAssignee() {
-    deployJpdlResource("org/jbpm/examples/task/assignee/process.jpdl.xml");
-    
     Map<String, Object> variables = new HashMap<String, Object>(); 
     variables.put("order", new Order("johndoe"));
     Execution execution = executionService.startProcessInstanceByKey("TaskAssignee", variables);

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignmenthandler/TaskAssignmentHandlerTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignmenthandler/TaskAssignmentHandlerTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignmenthandler/TaskAssignmentHandlerTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -31,11 +31,22 @@
  */
 public class TaskAssignmentHandlerTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-TaskAssignmentHandlerTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-TaskAssignmentHandlerTest.jar");
+    super.tearDown();
+  }
+
   public void testTaskAssignmentHandler() {
-    deployJpdlResource("org/jbpm/examples/task/assignmenthandler/process.jpdl.xml");
-    
+
     executionService.startProcessInstanceByKey("TaskAssignmentHandler");
-    
+
     List<Task> taskList = taskService.findAssignedTasks("johndoe");
     assertEquals(1, taskList.size());
     Task task = taskList.get(0);

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/candidates/TaskCandidatesTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/candidates/TaskCandidatesTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/candidates/TaskCandidatesTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -33,28 +33,37 @@
  */
 public class TaskCandidatesTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-TaskCandidatesTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-TaskCandidatesTest.jar");
+    super.tearDown();
+  }
+
   public void testGroupCandidateAssignment() {
     // create johndoe and joesmoe as members of the sales group
     identityService.createGroup("sales");
-    
+
     identityService.createUser("johndoe", "johndoe", "John", "Doe");
     identityService.createMembership("johndoe", "sales");
 
     identityService.createUser("joesmoe", "joesmoe", "Joe", "Smoe");
     identityService.createMembership("joesmoe", "sales");
-
-    // deploy the process
-    deployJpdlResource("org/jbpm/examples/task/candidates/process.jpdl.xml");
     
     Execution execution = executionService.startProcessInstanceByKey("TaskCandidates");
     String executionId = execution.getId();
-    
+
     // both johndoe and joesmoe will see the task in their *takable* task list 
     List<Task> taskList = taskService.findTakableTasks("johndoe");
     assertEquals("Expected a single task in johndoe's takable task list", 1, taskList.size());
     Task task = taskList.get(0);
     assertEquals("review", task.getName());
-    
+
     taskList = taskService.findTakableTasks("joesmoe");
     assertEquals("Expected a single task in joesmoe's takable task list", 1, taskList.size());
     task = taskList.get(0);
@@ -70,7 +79,7 @@
 
     // lets assume that johndoe takes the task
     taskService.assignTask(task.getDbid(), "johndoe");
-    
+
     // johndoe's and joesmoe's takable task list is now empty  
     taskList = taskService.findTakableTasks("johndoe");
     assertEquals(0, taskList.size());
@@ -84,14 +93,14 @@
     task = taskList.get(0);
     assertEquals("review", task.getName());
     assertEquals("johndoe", task.getAssignee());
-    
+
     // joesmoe will not see the task in the assigned task list
     taskList = taskService.findAssignedTasks("joesmoe");
     assertEquals(0, taskList.size());
 
     // now johndoe completes the task
     taskService.completeTask(task.getDbid());
-    
+
     // verify that the task list is now empty
     taskList = taskService.findAssignedTasks("johndoe");
     assertEquals(0, taskList.size());

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/swimlane/TaskSwimlaneTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/swimlane/TaskSwimlaneTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/swimlane/TaskSwimlaneTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -32,12 +32,22 @@
  */
 public class TaskSwimlaneTest extends JbpmTestCase {
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-TaskSwimlaneTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-TaskSwimlaneTest.jar");
+    super.tearDown();
+  }
+
   public void testTaskSwimlane() {
-	identityService.createGroup("sales");
+    identityService.createGroup("sales");
     identityService.createUser("johndoe", "johndoe", "John", "Doe");
     identityService.createMembership("johndoe", "sales");
-
-    deployJpdlResource("org/jbpm/examples/task/swimlane/process.jpdl.xml");
     
     executionService.startProcessInstanceByKey("TaskSwimlane");
 
@@ -52,12 +62,12 @@
 
     // lets assume that johndoe takes the task
     taskService.assignTask(taskDbid, "johndoe");
-    
+
     // the next task will be created and assigned directly to johndoe
     // this is because johndoe was the person that took the previous task 
     // in the salesRepresentative swimlane.  so that person is most likely 
     // to know the context of this case
-    
+
     // we'll check that the group task lists for johndoe and joesmoe are empty
     assertEquals(0, taskService.findTakableTasks("johndoe").size());
 

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/variables/TaskVariablesTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/variables/TaskVariablesTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/variables/TaskVariablesTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -37,10 +37,20 @@
  * @author Tom Baeyens
  */
 public class TaskVariablesTest extends JbpmTestCase {
-  
-  public void testTaskAssignee() {
-    deployJpdlResource("org/jbpm/examples/task/variables/process.jpdl.xml");
 
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    deploy("jbpm-TaskVariablesTest.jar");
+  }
+
+  protected void tearDown() throws Exception
+  {
+    undeploy("jbpm-TaskVariablesTest.jar");
+    super.tearDown();
+  }
+
+  public void testTaskAssignee() { 
     Map<String, Object> variables = new HashMap<String, Object>();
     variables.put("category", "big");
     variables.put("dollars", 100000);
@@ -69,14 +79,17 @@
     variables.put("category", "small");
     variables.put("lires", 923874893);
     taskService.setVariables(taskDbid, variables);
-    
+
     expectedVariables = new HashMap<String, Object>();
     expectedVariables.put("category", "small");
     expectedVariables.put("lires", 923874893);
     expectedVariables.put("dollars", 100000);
+
+    // The default java.util.HashSet#KeySet is not serializable
+    Set<String> names = new HashSet(expectedVariables.keySet());
     
-    variables = executionService.getVariables(execution.getId(), expectedVariables.keySet());
-    
+    variables = executionService.getVariables(execution.getId(), names);
+
     assertEquals(expectedVariables, variables);
   }
 }

Added: jbpm4/trunk/modules/examples/src/test/resources/jndi.properties
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/jndi.properties	                        (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/resources/jndi.properties	2009-04-01 20:47:29 UTC (rev 4383)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp\://${jboss.bind.address}\:1099

Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/expression/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/expression/process.jpdl.xml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/script/expression/process.jpdl.xml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -7,7 +7,7 @@
   </start>
 
   <script name="invoke script" 
-          expr="Send packet to #{person.address}"
+          expr="Send packet to #{order.address}"
           var="text"
           g="96,16,104,52">
 

Modified: jbpm4/trunk/modules/integration/console/integration-console.iml
===================================================================
--- jbpm4/trunk/modules/integration/console/integration-console.iml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/integration/console/integration-console.iml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -9,11 +9,11 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="gwt-server-integration" />
-    <orderEntry type="module" module-name="toplevel" />
-    <orderEntry type="module" module-name="pvm" />
-    <orderEntry type="module" module-name="gwt-rpc" />
-    <orderEntry type="module" module-name="api" />
+    <orderEntry type="module" module-name="pvm" exported="" />
+    <orderEntry type="module" module-name="api" exported="" />
+    <orderEntry type="module" module-name="gwt-rpc" exported="" />
+    <orderEntry type="module" module-name="toplevel" exported="" />
+    <orderEntry type="module" module-name="gwt-server-integration" exported="" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:provided">
         <CLASSES>
@@ -61,7 +61,7 @@
         </SOURCES>
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.jboss.identity:idm-spi:jar:1.0.0-SNAPSHOT:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/identity/idm-spi/1.0.0-SNAPSHOT/idm-spi-1.0.0-SNAPSHOT.jar!/" />
@@ -70,16 +70,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
-      <library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:provided">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: junit:junit:jar:3.8.1:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
@@ -88,7 +79,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.hibernate:hibernate-commons-annotations:jar:3.0.0.ga:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/hibernate/hibernate-commons-annotations/3.0.0.ga/hibernate-commons-annotations-3.0.0.ga.jar!/" />
@@ -97,7 +88,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.hibernate:hibernate:jar:3.2.6.ga:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar!/" />
@@ -106,7 +97,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: commons-logging:commons-logging:jar:1.0.4:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar!/" />
@@ -115,7 +106,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.jboss.cache:jbosscache-core:jar:3.0.2.GA:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/cache/jbosscache-core/3.0.2.GA/jbosscache-core-3.0.2.GA.jar!/" />
@@ -124,7 +115,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: juel:juel-engine:jar:2.1.0:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/juel/juel-engine/2.1.0/juel-engine-2.1.0.jar!/" />
@@ -133,7 +124,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: antlr:antlr:jar:2.7.6:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar!/" />
@@ -142,7 +133,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: asm:asm:jar:1.5.3:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar!/" />
@@ -151,7 +142,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javassist:javassist:jar:3.4.GA:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javassist/javassist/3.4.GA/javassist-3.4.GA.jar!/" />
@@ -160,7 +151,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.jboss.identity:idm-api:jar:1.0.0-SNAPSHOT:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/identity/idm-api/1.0.0-SNAPSHOT/idm-api-1.0.0-SNAPSHOT.jar!/" />
@@ -169,7 +160,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javax.persistence:persistence-api:jar:1.0:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar!/" />
@@ -178,7 +169,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.jboss.identity:idm:jar:1.0.0-SNAPSHOT:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/identity/idm/1.0.0-SNAPSHOT/idm-1.0.0-SNAPSHOT.jar!/" />
@@ -187,7 +178,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: juel:juel:jar:2.1.0:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/juel/juel/2.1.0/juel-2.1.0.jar!/" />
@@ -196,7 +187,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.hibernate:ejb3-persistence:jar:1.0.1.GA:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/hibernate/ejb3-persistence/1.0.1.GA/ejb3-persistence-1.0.1.GA.jar!/" />
@@ -205,7 +196,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.jboss.identity:idm-common:jar:1.0.0-SNAPSHOT:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/identity/idm-common/1.0.0-SNAPSHOT/idm-common-1.0.0-SNAPSHOT.jar!/" />
@@ -214,7 +205,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: jgroups:jgroups:jar:2.6.7.GA:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/jgroups/jgroups/2.6.7.GA/jgroups-2.6.7.GA.jar!/" />
@@ -225,7 +216,7 @@
         </SOURCES>
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: jboss:jboss-j2ee:jar:4.2.2.GA:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/jboss/jboss-j2ee/4.2.2.GA/jboss-j2ee-4.2.2.GA.jar!/" />
@@ -234,7 +225,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.sun.xml.bind:jaxb-impl:jar:2.1.8:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.8/jaxb-impl-2.1.8.jar!/" />
@@ -243,7 +234,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: net.sf.ehcache:ehcache:jar:1.2.3:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar!/" />
@@ -252,7 +243,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.hibernate:hibernate-annotations:jar:3.3.1.GA:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/hibernate/hibernate-annotations/3.3.1.GA/hibernate-annotations-3.3.1.GA.jar!/" />
@@ -261,7 +252,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: juel:juel-impl:jar:2.1.0:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/juel/juel-impl/2.1.0/juel-impl-2.1.0.jar!/" />
@@ -270,7 +261,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.livetribe:livetribe-jsr223:jar:2.0.5:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/livetribe/livetribe-jsr223/2.0.5/livetribe-jsr223-2.0.5.jar!/" />
@@ -279,7 +270,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: dom4j:dom4j:jar:1.6.1:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar!/" />
@@ -290,7 +281,7 @@
         </SOURCES>
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: cglib:cglib:jar:2.1_3:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar!/" />
@@ -299,7 +290,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: asm:asm-attrs:jar:1.5.3:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar!/" />
@@ -308,7 +299,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.jboss:jboss-common-core:jar:2.2.10.GA:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA.jar!/" />
@@ -319,7 +310,7 @@
         </SOURCES>
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: commons-collections:commons-collections:jar:2.1.1:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar!/" />
@@ -328,7 +319,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.hibernate:hibernate-entitymanager:jar:3.3.2.GA:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/hibernate/hibernate-entitymanager/3.3.2.GA/hibernate-entitymanager-3.3.2.GA.jar!/" />
@@ -337,7 +328,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar!/" />
@@ -348,7 +339,7 @@
         </SOURCES>
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: log4j:log4j:jar:1.2.14:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar!/" />
@@ -359,6 +350,17 @@
         </SOURCES>
       </library>
     </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.transaction:jta:jar:1.1:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
     <orderEntryProperties />
   </component>
 </module>

Modified: jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -9,10 +9,10 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="toplevel" exported="" />
-    <orderEntry type="module" module-name="pvm" exported="" />
-    <orderEntry type="module" module-name="jpdl" exported="" />
-    <orderEntry type="module" module-name="api" exported="" />
+    <orderEntry type="module" module-name="api" />
+    <orderEntry type="module" module-name="pvm" />
+    <orderEntry type="module" module-name="toplevel" />
+    <orderEntry type="module" module-name="integration-spi" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.jboss.identity:idm-spi:jar:1.0.0-SNAPSHOT:compile">
         <CLASSES>
@@ -1083,15 +1083,13 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: javax.transaction:jta:jar:1.1:compile">
+    <orderEntry type="module-library">
+      <library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar!/" />
         </CLASSES>
         <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1-sources.jar!/" />
-        </SOURCES>
+        <SOURCES />
       </library>
     </orderEntry>
     <orderEntryProperties />

Modified: jbpm4/trunk/modules/integration/spi/integration-spi.iml
===================================================================
--- jbpm4/trunk/modules/integration/spi/integration-spi.iml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/integration/spi/integration-spi.iml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -9,10 +9,9 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="toplevel" />
-    <orderEntry type="module" module-name="pvm" />
-    <orderEntry type="module" module-name="jpdl" />
-    <orderEntry type="module" module-name="api" />
+    <orderEntry type="module" module-name="api" exported="" />
+    <orderEntry type="module" module-name="pvm" exported="" />
+    <orderEntry type="module" module-name="toplevel" exported="" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:test">
         <CLASSES>
@@ -1081,13 +1080,15 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
-      <library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.transaction:jta:jar:1.1:compile">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar!/" />
         </CLASSES>
         <JAVADOC />
-        <SOURCES />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1-sources.jar!/" />
+        </SOURCES>
       </library>
     </orderEntry>
     <orderEntryProperties />

Modified: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -109,7 +109,7 @@
           log.info("The deployment artifact for process '"+deploymentRef+" has been deleted."+
               " The process definition will be removed.");
 
-          repositoryService.deleteDeployment(deploymentRef.getDeploymentDbid());
+          repositoryService.deleteDeploymentCascade(deploymentRef.getDeploymentDbid());
         }
         else
         {

Deleted: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.test.xml;
-
-import org.jbpm.test.JbpmTestCase;
-import org.jbpm.Execution;
-
-/**
- * A simple test execution that force the generation of the
- * hypersomic database structure.
- * 
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class DbGenTest extends JbpmTestCase
-{
-
-  public void testWaitStatesSequence() {
-    deployJpdlResource("org/jbpm/test/xml/process.jpdl.xml");
-
-    Execution execution = executionService.startProcessInstanceByKey("StateSequence");
-    assertEquals("a", execution.getActivityName());
-
-    String executionId = execution.getId();
-    execution = executionService.signalExecutionById(executionId);
-    assertEquals("b", execution.getActivityName());
-
-    execution = executionService.signalExecutionById(executionId);
-    assertEquals("c", execution.getActivityName());
-  }
-}

Modified: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -21,53 +21,48 @@
  */
 package org.jbpm.test;
 
+import org.jbpm.*;
+import org.jbpm.cmd.CommandService;
+import org.jbpm.job.Job;
+import org.jbpm.task.Task;
+import org.jbpm.test.enterprise.IntegrationTestHelper;
+
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
+import java.util.zip.ZipInputStream;
+import java.net.URL;
+import java.io.IOException;
 
-import org.jbpm.Configuration;
-import org.jbpm.Execution;
-import org.jbpm.ExecutionService;
-import org.jbpm.HistoryService;
-import org.jbpm.IdentityService;
-import org.jbpm.ManagementService;
-import org.jbpm.ProcessEngine;
-import org.jbpm.ProcessService;
-import org.jbpm.RepositoryService;
-import org.jbpm.TaskService;
-import org.jbpm.cmd.CommandService;
-import org.jbpm.job.Job;
-import org.jbpm.task.Task;
-
 /** base class for persistent jBPM tests.
- * 
+ *
  * This class exposes a lot of extra convenience methods for testing 
  * process executions.
- * 
+ *
  * The ProcessEngine services will be initialized and available as 
  * member fields.
- * 
+ *
  * This test assumes that each test will clean the DB itself and that 
  * no data is in the DB tables when the test finishes.  
- *  
+ *
  * During tearDown, a check will be done if all the DB tables are 
  * empty.  If not, that is logged with a F I X M E and the DB tables 
  * are cleaned. 
- * 
- * Convenience methods {@link #deployJpdlXmlString(String)} and 
- * {@link #deployJpdlResource(String)} will automatically keep track
+ *
+ * Convenience method {@link #deployJpdlResource(String)} will automatically keep track
  * of the deployed process and delete it (and all the related executions)
  * before the check is done.
- * 
+ *
  * Similarly, the {@link #saveAndRegisterTask(Task)} will delete 
  * the task before the check is done in the tearDown.
- * 
+ *
  * @author Tom Baeyens
+ * @author Heiko Braun
  */
 public abstract class JbpmTestCase extends BaseJbpmTestCase {
-  
+
   protected static ProcessEngine processEngine = null;
-  
+
   protected static RepositoryService repositoryService;
   protected static ExecutionService executionService;
   protected static ManagementService managementService;
@@ -79,11 +74,13 @@
 
   /** registered deployments.  registered deployments will be deleted automatically 
    * in the tearDown. This is a convenience function as each test is expected to clean up the DB. */
-  protected List<Long> registeredDeployments;
+  protected List<Long> registeredDeployments = new ArrayList<Long>();
   /** registered tasks will be deleted automatically in the tearDown.
    * This is a convenience function as each test is expected to clean up the DB. */
-  protected List<Long> registeredTaskIds;
+  protected List<Long> registeredTaskIds = new ArrayList<Long>();
 
+  private IntegrationTestHelper testHelper = null;
+
   protected void setUp() throws Exception {
     super.setUp();
     initialize();
@@ -113,65 +110,139 @@
   }
 
   protected void tearDown() throws Exception {
-    if (registeredDeployments!=null) {
-      for (Long deploymentDbid : registeredDeployments) {
-        repositoryService.deleteDeploymentCascade(deploymentDbid);
-      }
+
+    for (Long deploymentDbid : registeredDeployments) {
+      repositoryService.deleteDeploymentCascade(deploymentDbid);
     }
 
-    if (registeredTaskIds != null) {
-      for (Long taskDbid : registeredTaskIds) {
-        taskService.cancelTask(taskDbid);
-      }
+    for (Long taskDbid : registeredTaskIds) {
+      taskService.cancelTask(taskDbid);
     }
 
     Db.verifyClean(processEngine);
-    
+
     super.tearDown();
   }
 
+  protected void deploy(String archive)
+  {
+    if(isIntegrationTest())
+      remoteDeploy(archive);
+    else
+      localDeploy(archive);
+  }
+
+  private void remoteDeploy(String archive)
+  {
+    try
+    {
+      getTestHelper().deploy(archive);
+    }
+    catch (Exception e)
+    {
+      throw new RuntimeException("Failed to deploy " + archive, e);
+    }
+  }
+
+  protected void undeploy(String archive)
+  {
+    if(isIntegrationTest())
+      remoteUndeploy(archive);
+
+    // TODO: localUndeploy() happens in tearDown()
+  }
+
+  private void localUndeploy(String archive)
+  {
+    // TODO: Match archive with dbId, but for now undeploy any
+    for (Long deploymentDbid : registeredDeployments)
+    {
+      repositoryService.deleteDeploymentCascade(deploymentDbid);
+    }
+  }
+
+  private void remoteUndeploy(String archive)
+  {
+    try
+    {
+      getTestHelper().undeploy(archive);
+    }
+    catch (Exception e)
+    {
+      throw new RuntimeException("Failed to undeploy " + archive, e);
+    }
+  }
+
+  protected IntegrationTestHelper getTestHelper()
+  {
+    if(!isIntegrationTest())
+      throw new IllegalArgumentException("'jboss.bind.address' system property is missing");
+
+    if(null==testHelper)
+      testHelper = new IntegrationTestHelper();
+
+    return testHelper;
+  }
+
+  protected boolean isIntegrationTest()
+  {
+    return System.getProperty("jboss.bind.address")!=null;
+  }
+
+  @Deprecated
   public long deployJpdlXmlString(String jpdlXmlString) {
-    long deploymentDbid = 
-      repositoryService.createDeployment()
-        .addResourceFromString("xmlstring.jpdl.xml", jpdlXmlString)
-        .deploy();
-    
+    long deploymentDbid =
+        repositoryService.createDeployment()
+            .addResourceFromString("xmlstring.jpdl.xml", jpdlXmlString)
+            .deploy();
+
     registerDeployment(deploymentDbid);
-    
+
     return deploymentDbid;
   }
-  
+
+  /*@Deprecated
   public void deployJpdlResource(String resource) {
-    long deploymentDbid = 
-      repositoryService.createDeployment()
-        .addResourceFromClasspath(resource)
-        .deploy();
+    long deploymentDbid =
+        repositoryService.createDeployment()
+            .addResourceFromClasspath(resource)
+            .deploy();
 
     registerDeployment(deploymentDbid);
+  }*/
+
+  public void localDeploy(String archive) {
+
+    URL archiveUrl = IntegrationTestHelper.getTestArchiveURL(archive);
+
+    try
+    {
+      long deploymentDbid =
+          repositoryService.createDeployment()
+              .addResourcesFromZipInputStream(new ZipInputStream(archiveUrl.openStream()))
+              .deploy();
+
+      registerDeployment(deploymentDbid);
+    }
+    catch (IOException e)
+    {
+      throw new RuntimeException("local deploy failed", e);
+    }
   }
 
   protected void registerDeployment(long deploymentDbid) {
-    if (registeredDeployments==null) {
-      registeredDeployments = new ArrayList<Long>();
-    }
-    
     registeredDeployments.add(deploymentDbid);
   }
 
   public long saveAndRegisterTask(Task task) {
     long taskDbid = taskService.saveTask(task);
-    
-    if (registeredTaskIds == null) {
-      registeredTaskIds = new ArrayList<Long>();
-    }
     registeredTaskIds.add(taskDbid);
-    
     return taskDbid;
   }
 
   public HashSet<String> getActivityNames(String processInstanceId) {
     HashSet<String> activityNames = new HashSet<String>();
-    
+
     List<Execution> executions = executionService.findExecutions(processInstanceId);
     for (Execution execution: executions) {
       String activityName = execution.getActivityName();
@@ -179,7 +250,7 @@
         activityNames.add(activityName);
       }
     }
-    
+
     return activityNames;
   }
 
@@ -190,7 +261,7 @@
         return execution;
       }
     }
-    
+
     return null;
   }
 
@@ -202,7 +273,7 @@
     }
     return null;
   }
-  
+
   public static void assertContainsTask(List<Task> taskList, String taskName) {
     if (getTask(taskList, taskName)==null) {
       fail("tasklist doesn't contain task '"+taskName+"': "+taskList);
@@ -225,22 +296,22 @@
     }
     return null;
   }
-  
+
   public void executeAsyncMessage(Execution execution) {
     List<Job> jobs = managementService
-      .createJobQuery()
-      .messages()
-      .processInstanceId(execution.getId())
-      .execute();
-    
+        .createJobQuery()
+        .messages()
+        .processInstanceId(execution.getId())
+        .execute();
+
     if (jobs.isEmpty()) {
       fail("no async message");
     }
-    
+
     if (jobs.size()>1) {
       fail("more then one async message");
     }
-    
+
     managementService.executeJob(jobs.get(0).getDbid());
   }
 

Copied: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/ArchiveDeployer.java (from rev 4371, jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/ArchiveDeployer.java)
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/ArchiveDeployer.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/ArchiveDeployer.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -0,0 +1,42 @@
+/*
+ * 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.test.enterprise;
+
+import java.net.URL;
+
+/**
+ * An archive deployer
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 16-May-2006
+ */
+public interface ArchiveDeployer {
+  /**
+   * Deploy the given archive
+   */
+  void deploy(URL archive) throws Exception;
+
+  /**
+   * Undeploy the given archive
+   */
+  void undeploy(URL archive) throws Exception;
+}


Property changes on: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/ArchiveDeployer.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/IntegrationTestHelper.java (from rev 4371, jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/IntegrationTestHelper.java)
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/IntegrationTestHelper.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/IntegrationTestHelper.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -0,0 +1,224 @@
+/*
+ * 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.test.enterprise;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Hashtable;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * An integration test helper that deals with test deployment/undeployment, etc.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class IntegrationTestHelper {
+  protected static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
+  protected static final String SYSPROP_TEST_ARCHIVE_DIRECTORY = "test.archive.directory";
+
+  protected static String testResourcesDir;
+  protected static String testArchiveDir;
+
+  private static MBeanServerConnection server;
+  private String integrationTarget;
+
+  public void deploy(String[] archives) throws Exception {
+    for(String archive : archives)
+    {
+      deploy(archive);
+    }
+  }
+
+  public void deploy(String archive) throws Exception {
+    URL url = getTestArchiveFile(archive).toURI().toURL();
+    deploy(url);
+  }
+
+  public void deploy(URL archive) throws Exception {
+    getDeployer().deploy(archive);
+  }
+
+  public void undeploy(String[] archives) throws Exception
+  {
+    for(String archive : archives)
+    {
+      undeploy(archive);
+    }
+  }
+
+  public void undeploy(String archive) throws Exception {
+    File testArchiveFile = getTestArchiveFile(archive);
+    URL url = testArchiveFile.toURI().toURL();    
+    undeploy(url);
+  }
+
+  public void undeploy(URL archive) throws Exception {
+    File testArchiveFile = getTestArchiveFile(archive.getPath());
+    File testArchiveFileTmp = new File(testArchiveFile.getAbsolutePath()+ ".tmp");
+
+    // if not moved the JBPMDeployer retains the process definition ;)
+    testArchiveFile.renameTo(testArchiveFileTmp);
+
+    // invoke MainDeployer
+    getDeployer().undeploy(archive);
+
+    // restore orig file for subsequent tests
+    testArchiveFileTmp.renameTo(testArchiveFile);
+  }
+
+  public boolean isTargetJBoss500() {
+    String target = getIntegrationTarget();
+    return target.startsWith("jboss500");
+  }
+
+  public boolean isTargetJBoss423() {
+    String target = getIntegrationTarget();
+    return target.startsWith("jboss423");
+  }
+
+  public boolean isTargetJBoss422() {
+    String target = getIntegrationTarget();
+    return target.startsWith("jboss422");
+  }
+
+  private String getIntegrationTarget() {
+    if (integrationTarget == null) {
+      String jbossVersion;
+      try {
+        ObjectName oname = ObjectNameFactory
+            .create("jboss.system:type=ServerConfig");
+        jbossVersion = (String) getServer().getAttribute(oname,
+            "SpecificationVersion");
+      } catch (Exception ex) {
+        throw new IllegalStateException("Cannot obtain jboss version", ex);
+      }
+
+      if (jbossVersion.startsWith("5.0.0"))
+        integrationTarget = "jboss500";
+      else if (jbossVersion.startsWith("4.2.3"))
+        integrationTarget = "jboss423";
+      else if (jbossVersion.startsWith("4.2.2"))
+        integrationTarget = "jboss422";
+      else
+        throw new IllegalStateException("Unsupported jboss version: "
+            + jbossVersion);
+    }
+    return integrationTarget;
+  }
+
+  public MBeanServerConnection getServer() {
+    if (server == null) {
+      Hashtable jndiEnv = null;
+      try {
+        InitialContext iniCtx = new InitialContext();
+        jndiEnv = iniCtx.getEnvironment();
+        server = (MBeanServerConnection) iniCtx
+            .lookup("jmx/invoker/RMIAdaptor");
+      } catch (NamingException ex) {
+        throw new RuntimeException(
+            "Cannot obtain MBeanServerConnection using jndi props: " + jndiEnv,
+            ex);
+      }
+    }
+    return server;
+  }
+
+  private ArchiveDeployer getDeployer() {
+    return new JBossArchiveDeployer(getServer());
+  }
+
+  /** Try to discover the URL for the test resource */
+  public URL getResourceURL(String resource) {
+    URL resURL = null;
+    try {
+      File resourceFile = getResourceFile(resource);
+      resURL = resourceFile.toURI().toURL();
+    } catch (MalformedURLException e) {
+      // ignore
+    }
+    return resURL;
+  }
+
+  /** Try to discover the File for the test resource */
+  public File getResourceFile(String resource) {
+    File file = new File(resource);
+    if (file.exists())
+      return file;
+
+    file = new File(getTestResourcesDir() + "/" + resource);
+    if (file.exists())
+      return file;
+
+    throw new IllegalArgumentException("Cannot obtain '"
+        + getTestResourcesDir() + "/" + resource + "'");
+  }
+
+  public String getTestResourcesDir() {
+    if (testResourcesDir == null) {
+      testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY,
+          "target/test-classes");
+    }
+    return testResourcesDir;
+  }
+
+  /** Try to discover the URL for the deployment archive */
+  public static URL getTestArchiveURL(String archive) {
+    try
+    {
+      return getTestArchiveFile(archive).toURI().toURL();
+    }
+    catch (MalformedURLException e)
+    {
+      throw new RuntimeException("Failed to getTestArchiveURL", e);
+    }
+  }
+
+  /** Try to discover the File for the deployment archive */
+  public static File getTestArchiveFile(String archive) {
+    File file = new File(archive);
+    if (file.exists())
+      return file;
+
+    file = new File(getTestArchiveDir() + "/" + archive);
+    if (file.exists())
+      return file;
+
+    String notSet = getTestArchiveDir() == null ? " System property '"
+        + SYSPROP_TEST_ARCHIVE_DIRECTORY + "' not set." : "";
+    throw new IllegalArgumentException("Cannot obtain '" + getTestArchiveDir()
+        + "/" + archive + "'." + notSet);
+  }
+
+  public static String getTestArchiveDir() {
+    if (testArchiveDir == null) {
+      testArchiveDir = System.getProperty(SYSPROP_TEST_ARCHIVE_DIRECTORY,
+          "target/test-libs");
+    }
+    return testArchiveDir;
+  }
+}


Property changes on: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/IntegrationTestHelper.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/IntegrationTestSetup.java (from rev 4371, jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/IntegrationTestSetup.java)
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/IntegrationTestSetup.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/IntegrationTestSetup.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -0,0 +1,127 @@
+/*
+ * 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.test.enterprise;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.MBeanServerConnection;
+
+import junit.extensions.TestSetup;
+import junit.framework.TestSuite;
+
+import org.jbpm.internal.log.Log;
+
+/**
+ * A test setup that deploys/undeploys archives
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class IntegrationTestSetup extends TestSetup {
+  private IntegrationTestHelper delegate = new IntegrationTestHelper();
+  private String[] archives;
+  private ClassLoader originalClassLoader;
+
+  private static final Log log = Log.getLog(IntegrationTestSetup.class
+      .getName());
+
+  public IntegrationTestSetup(Class<?> testClass, String... archiveList) {
+    super(new TestSuite(testClass));
+    archives = archiveList != null ? archiveList : new String[0];
+  }
+
+  public File getArchiveFile(String archive) {
+    return delegate.getTestArchiveFile(archive);
+  }
+
+  public URL getArchiveURL(String archive) throws MalformedURLException {
+    return delegate.getTestArchiveFile(archive).toURI().toURL();
+  }
+
+  public boolean isTargetJBoss500() {
+    return delegate.isTargetJBoss500();
+  }
+
+  public boolean isTargetJBoss423() {
+    return delegate.isTargetJBoss423();
+  }
+
+  public boolean isTargetJBoss422() {
+    return delegate.isTargetJBoss422();
+  }
+
+  public MBeanServerConnection getServer() {
+    return delegate.getServer();
+  }
+
+  @Override
+  protected void setUp() throws Exception {
+    log.debug("### START SETUP " + getTest());
+
+    List<URL> clientJars = new ArrayList<URL>();
+    for (int i = 0; i < archives.length; i++) {
+      String archive = archives[i];
+      try {
+        delegate.deploy(archive);
+      } catch (Exception ex) {
+        ex.printStackTrace();
+        delegate.undeploy(archive);
+      }
+
+      if (archive.endsWith("-client.jar")) {
+        URL archiveURL = getArchiveURL(archive);
+        clientJars.add(archiveURL);
+      }
+    }
+
+    ClassLoader parent = Thread.currentThread().getContextClassLoader();
+    originalClassLoader = parent;
+
+    // add client jars to the class loader
+    if (!clientJars.isEmpty()) {
+      URL[] urls = new URL[clientJars.size()];
+      for (int i = 0; i < clientJars.size(); i++) {
+        urls[i] = clientJars.get(i);
+      }
+      URLClassLoader cl = new URLClassLoader(urls, parent);
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  @Override
+  protected void tearDown() throws Exception {
+    try {
+      for (int i = 0; i < archives.length; i++) {
+        String archive = archives[archives.length - i - 1];
+        delegate.undeploy(archive);
+      }
+    } finally {
+      Thread.currentThread().setContextClassLoader(originalClassLoader);
+    }
+    log.debug("### END SETUP " + getTest());
+  }
+}


Property changes on: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/IntegrationTestSetup.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/JBossArchiveDeployer.java (from rev 4371, jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/JBossArchiveDeployer.java)
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/JBossArchiveDeployer.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/JBossArchiveDeployer.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -0,0 +1,56 @@
+/*
+ * 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.test.enterprise;
+
+import java.net.URL;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+
+/**
+ * An archive deployer that deals with test deployment/undeployment, etc.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class JBossArchiveDeployer implements ArchiveDeployer {
+  private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
+
+  private MBeanServerConnection server;
+
+  public JBossArchiveDeployer(MBeanServerConnection server) {
+    this.server = server;
+  }
+
+  public void deploy(URL url) throws Exception {
+    invokeMainDeployer("deploy", url);
+  }
+
+  public void undeploy(URL url) throws Exception {
+    invokeMainDeployer("undeploy", url);
+  }
+
+  private void invokeMainDeployer(String methodName, URL url) throws Exception {
+    server.invoke(new ObjectName(MAIN_DEPLOYER), methodName,
+        new Object[] { url }, new String[] { "java.net.URL" });
+  }
+}


Property changes on: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/JBossArchiveDeployer.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/ObjectNameFactory.java (from rev 4371, jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/enterprise/ObjectNameFactory.java)
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/ObjectNameFactory.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/ObjectNameFactory.java	2009-04-01 20:47:29 UTC (rev 4383)
@@ -0,0 +1,61 @@
+/*
+ * 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.test.enterprise;
+
+import java.util.Hashtable;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+/**
+ * A simple factory for creating safe object names.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-May-2006
+ */
+public class ObjectNameFactory {
+  public static ObjectName create(String name) {
+    try {
+      return new ObjectName(name);
+    } catch (MalformedObjectNameException e) {
+      throw new IllegalArgumentException("Invalid ObjectName: " + name, e);
+    }
+  }
+
+  public static ObjectName create(String domain, String key, String value) {
+    try {
+      return new ObjectName(domain, key, value);
+    } catch (MalformedObjectNameException e) {
+      throw new IllegalArgumentException("Invalid ObjectName: " + domain + ","
+          + key + "," + value, e);
+    }
+  }
+
+  public static ObjectName create(String domain, Hashtable<String, String> table) {
+    try {
+      return new ObjectName(domain, table);
+    } catch (MalformedObjectNameException e) {
+      throw new IllegalArgumentException("Invalid ObjectName: " + domain + ","
+          + table, e);
+    }
+  }
+}


Property changes on: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/enterprise/ObjectNameFactory.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Added: jbpm4/trunk/modules/test-base/test-base.iml
===================================================================
--- jbpm4/trunk/modules/test-base/test-base.iml	                        (rev 0)
+++ jbpm4/trunk/modules/test-base/test-base.iml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+  <component name="ModuleRootManager" />
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="api" />
+    <orderEntry type="module" module-name="toplevel" />
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: junit:junit:jar:3.8.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.hibernate:hibernate:jar:3.2.6.ga:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-logging:commons-logging:jar:1.0.4:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: dom4j:dom4j:jar:1.6.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: cglib:cglib:jar:2.1_3:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: asm:asm-attrs:jar:1.5.3:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: antlr:antlr:jar:2.7.6:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-collections:commons-collections:jar:2.1.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: asm:asm:jar:1.5.3:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:test">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: jboss:jboss-j2ee:jar:4.2.2.GA:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jboss/jboss-j2ee/4.2.2.GA/jboss-j2ee-4.2.2.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: log4j:log4j:jar:1.2.14:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: net.sf.ehcache:ehcache:jar:1.2.3:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntryProperties />
+  </component>
+</module>
+

Modified: jbpm4/trunk/modules/test-db/jbpm4-test-db.iml
===================================================================
--- jbpm4/trunk/modules/test-db/jbpm4-test-db.iml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/modules/test-db/jbpm4-test-db.iml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -9,15 +9,9 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="jbpm4-jpdl" exported="" />
-    <orderEntry type="module" module-name="jbpm4-pvm" exported="" />
-    <orderEntry type="module" module-name="jbpm4-test-base" exported="" />
-    <orderEntry type="module" module-name="jbpm4-task" exported="" />
-    <orderEntry type="module" module-name="jbpm4-toplevel" exported="" />
-    <orderEntry type="module" module-name="toplevel" exported="" />
     <orderEntry type="module" module-name="pvm" exported="" />
-    <orderEntry type="module" module-name="jpdl" exported="" />
     <orderEntry type="module" module-name="api" exported="" />
+    <orderEntry type="module" module-name="toplevel" exported="" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: jboss:jboss-j2ee:jar:4.2.2.GA:compile">
         <CLASSES>
@@ -356,6 +350,7 @@
         </SOURCES>
       </library>
     </orderEntry>
+    <orderEntry type="module" module-name="test-base" />
     <orderEntryProperties />
   </component>
 </module>

Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml	2009-04-01 19:58:48 UTC (rev 4382)
+++ jbpm4/trunk/pom.xml	2009-04-01 20:47:29 UTC (rev 4383)
@@ -15,7 +15,7 @@
          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>jBPM 4</name>
   <groupId>org.jbpm.jbpm4</groupId>
   <artifactId>jbpm</artifactId>
@@ -55,7 +55,7 @@
     <jboss.identity.version>1.0.0-SNAPSHOT</jboss.identity.version>
     <jboss.j2ee.version>4.2.2.GA</jboss.j2ee.version>
     <jbossesb.version>4.4.0.GA</jbossesb.version>
-    <jboss.client.version>5.0.0.GA</jboss.client.version>
+    <jboss.client.version>5.0.1.GA</jboss.client.version>
     <jsr233.version>2.0.5</jsr233.version>
     <juel.version>2.1.0</juel.version>
     <junit.version>3.8.1</junit.version>
@@ -75,7 +75,7 @@
   <!-- DependencyManagement -->
   <dependencyManagement>
     <dependencies>
-    
+
       <!-- Core engine components -->
       <dependency>
         <groupId>org.jbpm.jbpm4</groupId>
@@ -89,7 +89,7 @@
       </dependency>
       <dependency>
         <groupId>org.jbpm.jbpm4</groupId>
-        <artifactId>jbpm-enterprise</artifactId>      
+        <artifactId>jbpm-enterprise</artifactId>
         <version>${version}</version>
       </dependency>
       <dependency>
@@ -108,7 +108,7 @@
         <artifactId>jbpm-jboss5</artifactId>
         <version>${version}</version>
       </dependency>
-       <dependency>
+      <dependency>
         <groupId>org.jbpm.jbpm4</groupId>
         <artifactId>jbpm-jboss5</artifactId>
         <classifier>config</classifier>
@@ -144,8 +144,8 @@
         <artifactId>jbpm-test-db</artifactId>
         <version>${version}</version>
       </dependency>
-      
-    
+
+
       <!-- GWT console -->
       <dependency>
         <groupId>org.jboss.bpm</groupId>
@@ -217,11 +217,6 @@
         <version>${izpack.version}</version>
       </dependency>
       <dependency>
-        <groupId>jboss</groupId>
-        <artifactId>jboss-j2ee</artifactId>
-        <version>${jboss.j2ee.version}</version>
-      </dependency>
-      <dependency>
         <groupId>org.jbpm.jbpm4.dependencies.esb</groupId>
         <artifactId>jbossesb-rosetta</artifactId>
         <version>${jbossesb.version}</version>
@@ -231,12 +226,29 @@
         <artifactId>test-util</artifactId>
         <version>${jbossesb.version}</version>
       </dependency>
+
+      <!-- AS 5 dependencies -->
       <dependency>
-        <groupId>org.jboss.client</groupId>
-        <artifactId>jbossall-client</artifactId>
+        <groupId>org.jboss.javaee</groupId>
+        <artifactId>jboss-javaee</artifactId>
         <version>${jboss.client.version}</version>
       </dependency>
       <dependency>
+        <groupId>org.jboss.jbossas</groupId>
+        <artifactId>jboss-as-client</artifactId>
+        <version>${jboss.client.version}</version>
+        <type>pom</type>
+      </dependency>
+
+      <!-- enterprise module deepends on j2ee -->
+      <dependency>
+        <groupId>jboss</groupId>
+        <artifactId>jboss-j2ee</artifactId>
+        <version>${jboss.j2ee.version}</version>
+      </dependency>
+
+
+      <dependency>
         <groupId>juel</groupId>
         <artifactId>juel</artifactId>
         <version>${juel.version}</version>
@@ -256,7 +268,7 @@
         <artifactId>junit</artifactId>
         <version>${junit.version}</version>
       </dependency>
-       <dependency>
+      <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>servlet-api</artifactId>
         <version>${servlet-api.version}</version>
@@ -302,7 +314,7 @@
         <groupId>net.sourceforge.jtds</groupId>
         <artifactId>jtds</artifactId>
         <version>${jtds.version}</version>
-      </dependency>      
+      </dependency>
     </dependencies>
   </dependencyManagement>
 
@@ -411,7 +423,7 @@
     <profile>
       <id>distro</id>
       <modules>
-        <module>modules/enterprise</module>        
+        <module>modules/enterprise</module>
         <module>modules/devguide</module>
         <module>modules/userguide</module>
         <module>modules/distro</module>
@@ -473,14 +485,21 @@
         </plugins>
       </build>
     </profile>
-    
+
+    <!--
+       Name:  no-database
+       Descr: Setup the default database
+       -->
     <profile>
       <id>no-database</id>
       <activation>
         <property>
           <name>!database</name>
         </property>
-      </activation>      
+      </activation>
+      <properties>
+        <database>hsqldb</database>
+      </properties>
       <dependencies>
         <dependency>
           <groupId>hsqldb</groupId>
@@ -490,7 +509,7 @@
       </dependencies>
     </profile>
 
-     <profile>
+    <profile>
       <id>hsql</id>
       <activation>
         <property>




More information about the jbpm-commits mailing list