JBoss JBPM SVN: r2164 - jbpm3/trunk/modules/simulation.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-10 09:02:58 -0400 (Wed, 10 Sep 2008)
New Revision: 2164
Modified:
jbpm3/trunk/modules/simulation/pom.xml
Log:
[JBPM-1292] Integrate simulation tests in automated testrun
Modified: jbpm3/trunk/modules/simulation/pom.xml
===================================================================
--- jbpm3/trunk/modules/simulation/pom.xml 2008-09-10 12:51:06 UTC (rev 2163)
+++ jbpm3/trunk/modules/simulation/pom.xml 2008-09-10 13:02:58 UTC (rev 2164)
@@ -73,6 +73,13 @@
<!-- Plugins -->
<build>
<plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- [JBPM-1292] Integrate simulation tests in automated testrun -->
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
17 years, 7 months
JBoss JBPM SVN: r2163 - jbpm3/trunk/modules/enterprise/jar.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-10 08:51:06 -0400 (Wed, 10 Sep 2008)
New Revision: 2163
Modified:
jbpm3/trunk/modules/enterprise/jar/pom.xml
Log:
Enterprise tests still fail in Hudson
Modified: jbpm3/trunk/modules/enterprise/jar/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-09-10 11:20:44 UTC (rev 2162)
+++ jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-09-10 12:51:06 UTC (rev 2163)
@@ -166,6 +166,14 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1708 -->
+ <exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1709 -->
+ <exclude>org/jbpm/msg/jms/AsyncProcessingTest.java</exclude>
+ </excludes>
+ </configuration>
</plugin>
</plugins>
</build>
17 years, 7 months
JBoss JBPM SVN: r2162 - jbpm3/trunk/hudson/hudson-home.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-10 07:20:44 -0400 (Wed, 10 Sep 2008)
New Revision: 2162
Modified:
jbpm3/trunk/hudson/hudson-home/command.sh
Log:
[JBPM-1725] Try fix for OOM issue
Modified: jbpm3/trunk/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/trunk/hudson/hudson-home/command.sh 2008-09-10 09:36:55 UTC (rev 2161)
+++ jbpm3/trunk/hudson/hudson-home/command.sh 2008-09-10 11:20:44 UTC (rev 2162)
@@ -10,7 +10,7 @@
DISTRODIR=$JBPMDIR/modules/distribution/target
# Give Maven some more heap
-export MAVEN_OPTS=-Xmx256m
+export MAVEN_OPTS=-Xmx512m
case "$CONTAINER" in
jboss422*)
17 years, 7 months
JBoss JBPM SVN: r2161 - jbpm3/trunk/modules/core.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-10 05:36:55 -0400 (Wed, 10 Sep 2008)
New Revision: 2161
Modified:
jbpm3/trunk/modules/core/pom.xml
Log:
[JBPM-1725] Try fix for OOM issue
Modified: jbpm3/trunk/modules/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/core/pom.xml 2008-09-10 09:35:34 UTC (rev 2160)
+++ jbpm3/trunk/modules/core/pom.xml 2008-09-10 09:36:55 UTC (rev 2161)
@@ -228,10 +228,6 @@
<exclude>org/jbpm/perf/StateUpdateTest.java</exclude>
<!-- https://jira.jboss.org/jira/browse/JBPM-1724 -->
<exclude>org/jbpm/seam/SeamPageFlowTest.java</exclude>
- <!-- https://jira.jboss.org/jira/browse/JBPM-1725 -->
- <exclude>org/jbpm/context/exe/ContextInstanceDbTest.java</exclude>
- <exclude>org/jbpm/graph/node/StartStateDbTest.java</exclude>
- <exclude>org/jbpm/optimisticlocking/LockingTest.java</exclude>
</excludes>
</configuration>
</plugin>
17 years, 7 months
JBoss JBPM SVN: r2160 - jbpm3/trunk/hudson/hudson-home.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-10 05:35:34 -0400 (Wed, 10 Sep 2008)
New Revision: 2160
Modified:
jbpm3/trunk/hudson/hudson-home/command.sh
Log:
export MAVEN_OPTS=-Xmx256m
Modified: jbpm3/trunk/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/trunk/hudson/hudson-home/command.sh 2008-09-10 09:32:16 UTC (rev 2159)
+++ jbpm3/trunk/hudson/hudson-home/command.sh 2008-09-10 09:35:34 UTC (rev 2160)
@@ -10,7 +10,7 @@
DISTRODIR=$JBPMDIR/modules/distribution/target
# Give Maven some more heap
-export MAVEN_OPTS=-Xmx512m
+export MAVEN_OPTS=-Xmx256m
case "$CONTAINER" in
jboss422*)
17 years, 7 months
JBoss JBPM SVN: r2159 - jbpm3/trunk/hudson/hudson-home.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-10 05:32:16 -0400 (Wed, 10 Sep 2008)
New Revision: 2159
Modified:
jbpm3/trunk/hudson/hudson-home/command.sh
Log:
export MAVEN_OPTS=-Xmx512m
Modified: jbpm3/trunk/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/trunk/hudson/hudson-home/command.sh 2008-09-10 08:42:43 UTC (rev 2158)
+++ jbpm3/trunk/hudson/hudson-home/command.sh 2008-09-10 09:32:16 UTC (rev 2159)
@@ -3,12 +3,15 @@
# A script that uses Maven to build the project and
# execute its test suite against a given target container
#
-# $Id:$
+# $Id$
WORKSPACE=`pwd`
JBPMDIR=$WORKSPACE/jbpm
DISTRODIR=$JBPMDIR/modules/distribution/target
+# Give Maven some more heap
+export MAVEN_OPTS=-Xmx512m
+
case "$CONTAINER" in
jboss422*)
JBOSS_BUILD=jboss-4.2.2.GA
17 years, 7 months
JBoss JBPM SVN: r2158 - in jbpm3/trunk/modules: distribution/src/main/resources/installer and 2 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-10 04:42:43 -0400 (Wed, 10 Sep 2008)
New Revision: 2158
Modified:
jbpm3/trunk/modules/console/pom.xml
jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
jbpm3/trunk/modules/enterprise/ear/pom.xml
jbpm3/trunk/modules/enterprise/jar/pom.xml
Log:
Cleanup distro dependencies
Modified: jbpm3/trunk/modules/console/pom.xml
===================================================================
--- jbpm3/trunk/modules/console/pom.xml 2008-09-10 07:07:31 UTC (rev 2157)
+++ jbpm3/trunk/modules/console/pom.xml 2008-09-10 08:42:43 UTC (rev 2158)
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- ====================================================================== -->
-<!-- -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at http://www.gnu.org. -->
-<!-- -->
-<!-- ====================================================================== -->
+ <!-- ====================================================================== -->
+ <!-- -->
+ <!-- JBoss, the OpenSource J2EE webOS -->
+ <!-- -->
+ <!-- Distributable under LGPL license. -->
+ <!-- See terms of license at http://www.gnu.org. -->
+ <!-- -->
+ <!-- ====================================================================== -->
-<!-- $Id$ -->
+ <!-- $Id$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -18,77 +18,29 @@
<artifactId>jbpm-console</artifactId>
<packaging>war</packaging>
- <!-- Parent -->
+ <!-- Parent -->
<parent>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm</artifactId>
<version>3.3.0-SNAPSHOT</version>
</parent>
- <!-- Dependencies -->
+ <!-- Dependencies -->
<dependencies>
<!-- jBPM Dependencies -->
<dependency>
<groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-core</artifactId>
- <version>${version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-identity</artifactId>
- <version>${version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-jbpm4jsf</artifactId>
<version>${version}</version>
<exclusions>
<exclusion>
- <artifactId>jackrabbit-core</artifactId>
- <groupId>org.apache.jackrabbit</groupId>
- </exclusion>
- <exclusion>
- <artifactId>hibernate</artifactId>
- <groupId>org.hibernate</groupId>
- </exclusion>
- <exclusion>
- <artifactId>bsh</artifactId>
- <groupId>bsh</groupId>
- </exclusion>
- <exclusion>
- <artifactId>dom4j</artifactId>
- <groupId>dom4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>junit</artifactId>
- <groupId>junit</groupId>
- </exclusion>
- <exclusion>
- <artifactId>ant</artifactId>
- <groupId>org.apache.ant</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jsf-impl</artifactId>
<groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
</exclusion>
<exclusion>
- <artifactId>jcr</artifactId>
- <groupId>javax.jcr</groupId>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-identity</artifactId>
</exclusion>
- <exclusion>
- <artifactId>mail</artifactId>
- <groupId>javax.mail</groupId>
- </exclusion>
- <exclusion>
- <artifactId>el-api</artifactId>
- <groupId>javax.el</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jsf-api</artifactId>
- <groupId>javax.faces</groupId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -96,6 +48,18 @@
<artifactId>commons-fileupload</artifactId>
</dependency>
<dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+
+ <!-- Provided Dependencies -->
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-core</artifactId>
+ <version>${version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
@@ -105,13 +69,9 @@
<artifactId>commons-logging</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
</dependencies>
- <!-- Plugins -->
+ <!-- Plugins -->
<build>
<plugins>
<plugin>
Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-09-10 07:07:31 UTC (rev 2157)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-09-10 08:42:43 UTC (rev 2158)
@@ -154,12 +154,10 @@
<description>The jBPM3 Server Components</description>
<!-- jbpm/jbpm-service.sar -->
- <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar"
+ <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-enterprise-config" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar"
override="true">
- <include name="jbpm-core.jar" />
- <include name="jbpm-identity.jar" />
+ <include name="jbpm.cfg.xml" />
</fileset>
- <file src="@{deploy.artifacts.dir}/resources/jbpm-enterprise-config/jbpm.cfg.xml" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" />
<file src="@{deploy.artifacts.dir}/lib/jbpm-identity-service.zip" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar"
unpack="true" override="true" />
Modified: jbpm3/trunk/modules/enterprise/ear/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/ear/pom.xml 2008-09-10 07:07:31 UTC (rev 2157)
+++ jbpm3/trunk/modules/enterprise/ear/pom.xml 2008-09-10 08:42:43 UTC (rev 2158)
@@ -13,7 +13,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>JBoss jBPM - Enterprise Archive</name>
+ <name>JBoss jBPM - Enterprise Bundle</name>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-enterprise-archive</artifactId>
<packaging>ear</packaging>
@@ -30,21 +30,63 @@
<!-- jBPM Dependencies -->
<dependency>
<groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-console</artifactId>
+ <version>${version}</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-core</artifactId>
+ <version>${version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>bsh</groupId>
+ <artifactId>bsh</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-enterprise-beans</artifactId>
<version>${version}</version>
<type>ejb</type>
<exclusions>
- <exclusion>
- <artifactId>jbpm-core</artifactId>
- <groupId>org.jboss.jbpm</groupId>
- </exclusion>
+ <exclusion>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-core</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-console</artifactId>
+ <artifactId>jbpm-identity</artifactId>
<version>${version}</version>
- <type>war</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-core</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
@@ -61,6 +103,16 @@
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-enterprise-beans</artifactId>
</ejbModule>
+ <jarModule>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-core</artifactId>
+ <includeInApplicationXml>true</includeInApplicationXml>
+ </jarModule>
+ <jarModule>
+ <groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-identity</artifactId>
+ <includeInApplicationXml>true</includeInApplicationXml>
+ </jarModule>
<webModule>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-console</artifactId>
Modified: jbpm3/trunk/modules/enterprise/jar/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-09-10 07:07:31 UTC (rev 2157)
+++ jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-09-10 08:42:43 UTC (rev 2158)
@@ -16,7 +16,7 @@
<name>JBoss jBPM - Enterprise Beans</name>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-enterprise-beans</artifactId>
- <packaging>jar</packaging>
+ <packaging>ejb</packaging>
<!-- Parent -->
<parent>
17 years, 7 months
JBoss JBPM SVN: r2157 - in jbpm3/trunk/modules/core: src/test/java/org/jbpm/instantiation and 3 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-10 03:07:31 -0400 (Wed, 10 Sep 2008)
New Revision: 2157
Added:
jbpm3/trunk/modules/core/src/test/resources/org/jbpm/perf/memleaktest.processdefinition.xml
Removed:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jpdl/convert/
jbpm3/trunk/modules/core/src/test/resources/org/jbpm/perf/.gpd.memleaktest.processdefinition.xml
Modified:
jbpm3/trunk/modules/core/pom.xml
jbpm3/trunk/modules/core/src/test/java/org/jbpm/instantiation/UserCodeInterceptorTest.java
jbpm3/trunk/modules/core/src/test/java/org/jbpm/perf/PerfWithoutDbTest.java
Log:
Cleanup stale core tests
Modified: jbpm3/trunk/modules/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/core/pom.xml 2008-09-10 06:04:08 UTC (rev 2156)
+++ jbpm3/trunk/modules/core/pom.xml 2008-09-10 07:07:31 UTC (rev 2157)
@@ -175,37 +175,19 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!--
- Cleanup stale tests from the testsuite http://jira.jboss.org/jira/browse/JBPM-1205
- -->
- <exclude>org/jbpm/context/exe/VariableQueryDbTest.java</exclude>
- <exclude>org/jbpm/db/ContextSessionDbTest.java</exclude>
- <exclude>org/jbpm/DefaultConfigurationTest.java</exclude>
- <exclude>org/jbpm/graph/def/ExceptionHandlerDbTest.java</exclude>
- <exclude>org/jbpm/graph/def/TransitionDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/StateDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SubProcessCancellationTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SuperStateActionExecutionDbTest.java</exclude>
- <exclude>org/jbpm/graph/log/NodeLogTest.java</exclude>
- <exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
- <exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1720 -->
<exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1721 -->
<exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
- <exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
- <exclude>org/jbpm/jpdl/xml/SchemaTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LoggingConfigDbTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LogLogTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1722 -->
<exclude>org/jbpm/mail/MailTest.java</exclude>
<exclude>org/jbpm/mail/TaskMailTest.java</exclude>
<exclude>org/jbpm/mail/RealServerMailTestCase.java</exclude>
- <exclude>org/jbpm/mock/JdbcProxyTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1723 -->
<exclude>org/jbpm/perf/PerfWithoutDbTest.java</exclude>
<exclude>org/jbpm/perf/StateUpdateTest.java</exclude>
- <exclude>org/jbpm/perf/TasklistEagerLoadingTest.java</exclude>
- <exclude>org/jbpm/perf/TaskWithVariablesTest.java</exclude>
- <exclude>org/jbpm/persistence/db/PersistenceConfigurationTest.java</exclude>
- <exclude>org/jbpm/scheduler/exe/UnsafeSessionUsageTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1724 -->
<exclude>org/jbpm/seam/SeamPageFlowTest.java</exclude>
</excludes>
</configuration>
@@ -232,38 +214,24 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!--
- Cleanup stale tests from the testsuite http://jira.jboss.org/jira/browse/JBPM-1205
- -->
- <exclude>org/jbpm/context/exe/VariableQueryDbTest.java</exclude>
- <exclude>org/jbpm/db/ContextSessionDbTest.java</exclude>
- <exclude>org/jbpm/DefaultConfigurationTest.java</exclude>
- <exclude>org/jbpm/graph/def/ExceptionHandlerDbTest.java</exclude>
- <exclude>org/jbpm/graph/def/TransitionDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/StateDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SubProcessCancellationTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SuperStateActionExecutionDbTest.java</exclude>
- <exclude>org/jbpm/graph/log/NodeLogTest.java</exclude>
- <exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
- <exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1720 -->
<exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1721 -->
<exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
- <exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
- <exclude>org/jbpm/jpdl/xml/SchemaTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LoggingConfigDbTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LogLogTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1722 -->
<exclude>org/jbpm/mail/MailTest.java</exclude>
<exclude>org/jbpm/mail/TaskMailTest.java</exclude>
<exclude>org/jbpm/mail/RealServerMailTestCase.java</exclude>
- <exclude>org/jbpm/mock/JdbcProxyTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1723 -->
<exclude>org/jbpm/perf/PerfWithoutDbTest.java</exclude>
<exclude>org/jbpm/perf/StateUpdateTest.java</exclude>
- <exclude>org/jbpm/perf/TasklistEagerLoadingTest.java</exclude>
- <exclude>org/jbpm/perf/TaskWithVariablesTest.java</exclude>
- <exclude>org/jbpm/persistence/db/PersistenceConfigurationTest.java</exclude>
- <exclude>org/jbpm/scheduler/exe/UnsafeSessionUsageTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1724 -->
<exclude>org/jbpm/seam/SeamPageFlowTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1725 -->
+ <exclude>org/jbpm/context/exe/ContextInstanceDbTest.java</exclude>
+ <exclude>org/jbpm/graph/node/StartStateDbTest.java</exclude>
+ <exclude>org/jbpm/optimisticlocking/LockingTest.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -289,44 +257,20 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!--
- Cleanup stale tests from the testsuite http://jira.jboss.org/jira/browse/JBPM-1205
- -->
- <exclude>org/jbpm/context/exe/VariableQueryDbTest.java</exclude>
- <exclude>org/jbpm/db/ContextSessionDbTest.java</exclude>
- <exclude>org/jbpm/DefaultConfigurationTest.java</exclude>
- <exclude>org/jbpm/graph/def/ExceptionHandlerDbTest.java</exclude>
- <exclude>org/jbpm/graph/def/TransitionDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/StateDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SubProcessCancellationTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SuperStateActionExecutionDbTest.java</exclude>
- <exclude>org/jbpm/graph/log/NodeLogTest.java</exclude>
- <exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
- <exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1720 -->
<exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1721 -->
<exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
- <exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
- <exclude>org/jbpm/jpdl/xml/SchemaTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LoggingConfigDbTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LogLogTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1722 -->
<exclude>org/jbpm/mail/MailTest.java</exclude>
<exclude>org/jbpm/mail/TaskMailTest.java</exclude>
<exclude>org/jbpm/mail/RealServerMailTestCase.java</exclude>
- <exclude>org/jbpm/mock/JdbcProxyTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1723 -->
<exclude>org/jbpm/perf/PerfWithoutDbTest.java</exclude>
<exclude>org/jbpm/perf/StateUpdateTest.java</exclude>
- <exclude>org/jbpm/perf/TasklistEagerLoadingTest.java</exclude>
- <exclude>org/jbpm/perf/TaskWithVariablesTest.java</exclude>
- <exclude>org/jbpm/persistence/db/PersistenceConfigurationTest.java</exclude>
- <exclude>org/jbpm/scheduler/exe/UnsafeSessionUsageTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1724 -->
<exclude>org/jbpm/seam/SeamPageFlowTest.java</exclude>
- <!--
- Fix MySQL regression
- https://jira.jboss.org/jira/browse/JBPM-1711
- -->
- <exclude>org/jbpm/persistence/db/PersistenceServiceDbTest.java</exclude>
- <exclude>org/jbpm/persistence/db/PersistenceServiceFactoryDbTest.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -352,37 +296,19 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!--
- Cleanup stale tests from the testsuite http://jira.jboss.org/jira/browse/JBPM-1205
- -->
- <exclude>org/jbpm/context/exe/VariableQueryDbTest.java</exclude>
- <exclude>org/jbpm/db/ContextSessionDbTest.java</exclude>
- <exclude>org/jbpm/DefaultConfigurationTest.java</exclude>
- <exclude>org/jbpm/graph/def/ExceptionHandlerDbTest.java</exclude>
- <exclude>org/jbpm/graph/def/TransitionDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/StateDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SubProcessCancellationTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SuperStateActionExecutionDbTest.java</exclude>
- <exclude>org/jbpm/graph/log/NodeLogTest.java</exclude>
- <exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
- <exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1720 -->
<exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1721 -->
<exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
- <exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
- <exclude>org/jbpm/jpdl/xml/SchemaTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LoggingConfigDbTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LogLogTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1722 -->
<exclude>org/jbpm/mail/MailTest.java</exclude>
<exclude>org/jbpm/mail/TaskMailTest.java</exclude>
<exclude>org/jbpm/mail/RealServerMailTestCase.java</exclude>
- <exclude>org/jbpm/mock/JdbcProxyTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1723 -->
<exclude>org/jbpm/perf/PerfWithoutDbTest.java</exclude>
<exclude>org/jbpm/perf/StateUpdateTest.java</exclude>
- <exclude>org/jbpm/perf/TasklistEagerLoadingTest.java</exclude>
- <exclude>org/jbpm/perf/TaskWithVariablesTest.java</exclude>
- <exclude>org/jbpm/persistence/db/PersistenceConfigurationTest.java</exclude>
- <exclude>org/jbpm/scheduler/exe/UnsafeSessionUsageTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1724 -->
<exclude>org/jbpm/seam/SeamPageFlowTest.java</exclude>
</excludes>
</configuration>
@@ -409,37 +335,19 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!--
- Cleanup stale tests from the testsuite http://jira.jboss.org/jira/browse/JBPM-1205
- -->
- <exclude>org/jbpm/context/exe/VariableQueryDbTest.java</exclude>
- <exclude>org/jbpm/db/ContextSessionDbTest.java</exclude>
- <exclude>org/jbpm/DefaultConfigurationTest.java</exclude>
- <exclude>org/jbpm/graph/def/ExceptionHandlerDbTest.java</exclude>
- <exclude>org/jbpm/graph/def/TransitionDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/StateDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SubProcessCancellationTest.java</exclude>
- <exclude>org/jbpm/graph/exe/SuperStateActionExecutionDbTest.java</exclude>
- <exclude>org/jbpm/graph/log/NodeLogTest.java</exclude>
- <exclude>org/jbpm/instantiation/UserCodeInterceptorTest.java</exclude>
- <exclude>org/jbpm/JbpmDefaultConfigTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1720 -->
<exclude>org/jbpm/jcr/JcrDbTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1721 -->
<exclude>org/jbpm/job/executor/JobLoadJoinTest.java</exclude>
<exclude>org/jbpm/job/executor/JobLoadSubProcessTest.java</exclude>
- <exclude>org/jbpm/jpdl/convert/ConversionTestCase.java</exclude>
- <exclude>org/jbpm/jpdl/xml/SchemaTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LoggingConfigDbTest.java</exclude>
- <exclude>org/jbpm/logging/exe/LogLogTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1722 -->
<exclude>org/jbpm/mail/MailTest.java</exclude>
<exclude>org/jbpm/mail/TaskMailTest.java</exclude>
<exclude>org/jbpm/mail/RealServerMailTestCase.java</exclude>
- <exclude>org/jbpm/mock/JdbcProxyTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1723 -->
<exclude>org/jbpm/perf/PerfWithoutDbTest.java</exclude>
<exclude>org/jbpm/perf/StateUpdateTest.java</exclude>
- <exclude>org/jbpm/perf/TasklistEagerLoadingTest.java</exclude>
- <exclude>org/jbpm/perf/TaskWithVariablesTest.java</exclude>
- <exclude>org/jbpm/persistence/db/PersistenceConfigurationTest.java</exclude>
- <exclude>org/jbpm/scheduler/exe/UnsafeSessionUsageTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1724 -->
<exclude>org/jbpm/seam/SeamPageFlowTest.java</exclude>
</excludes>
</configuration>
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/instantiation/UserCodeInterceptorTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/instantiation/UserCodeInterceptorTest.java 2008-09-10 06:04:08 UTC (rev 2156)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/instantiation/UserCodeInterceptorTest.java 2008-09-10 07:07:31 UTC (rev 2157)
@@ -21,53 +21,24 @@
static List logs = null;
- public static class TestInterceptor implements UserCodeInterceptor {
-
- public void executeAction(Action action, ExecutionContext executionContext) throws Exception {
- logs.add("before action "+action.getName()+" in node "+ executionContext.getNode().getName());
- action.execute(executionContext);
- logs.add("after action "+action.getName()+" in node "+ executionContext.getNode().getName());
- }
-
- public void executeAssignment(AssignmentHandler assignmentHandler, Assignable assignable, ExecutionContext executionContext) throws Exception {
- logs.add("before assignment");
- assignmentHandler.assign(assignable, executionContext);
- logs.add("after assignment");
- }
-
- public void executeTaskControllerInitialization(TaskControllerHandler taskControllerHandler, TaskInstance taskInstance, ContextInstance contextInstance, Token token) {
- logs.add("before task controller initialization");
- taskControllerHandler.initializeTaskVariables(taskInstance, contextInstance, token);
- logs.add("after task controller initialization");
- }
- public void executeTaskControllerSubmission(TaskControllerHandler taskControllerHandler, TaskInstance taskInstance, ContextInstance contextInstance, Token token) {
- logs.add("before task controller submission");
- taskControllerHandler.submitTaskVariables(taskInstance, contextInstance, token);
- logs.add("after task controller submission");
- }
- }
-
TestInterceptor testInterceptor = null;
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception
+ {
logs = new ArrayList();
testInterceptor = new TestInterceptor();
UserCodeInterceptorConfig.setUserCodeInterceptor(testInterceptor);
}
- protected void tearDown() throws Exception {
+
+ protected void tearDown() throws Exception
+ {
UserCodeInterceptorConfig.setUserCodeInterceptor(null);
testInterceptor = null;
logs = null;
}
- public static class TestAction implements ActionHandler {
- private static final long serialVersionUID = 1L;
- public void execute(ExecutionContext executionContext) throws Exception {
- logs.add("action executed");
- }
- }
-
- public void testAction() {
+ public void testAction()
+ {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state name='start'>" +
@@ -91,15 +62,74 @@
assertEquals(expectedLogs, logs);
}
- public static class TestAutoAction implements ActionHandler {
- private static final long serialVersionUID = 1L;
- public void execute(ExecutionContext executionContext) throws Exception {
- logs.add("auto action executed");
- executionContext.leaveNode();
- }
+ public void testInterceptControllerInitialization()
+ {
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
+ "<process-definition>" +
+ " <start-state name='start'>" +
+ " <transition to='t'/>" +
+ " </start-state>" +
+ " <task-node name='t'>" +
+ " <task>" +
+ " <controller class='"+TestController.class.getName()+"'/>" +
+ " </task>" +
+ " <transition to='end'/>" +
+ " </task-node>" +
+ " <state name='end' />" +
+ "</process-definition>"
+ );
+ // create the process instance
+ ProcessInstance processInstance = new ProcessInstance(processDefinition);
+ processInstance.signal();
+
+ List expectedLogs = new ArrayList();
+ expectedLogs.add("before task controller initialization");
+ expectedLogs.add("initializing task variables for TaskInstance(t)");
+ expectedLogs.add("after task controller initialization");
+
+ assertEquals(expectedLogs,logs);
}
+
+ public void testInterceptControllerSubmission() {
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
+ "<process-definition>" +
+ " <start-state name='start'>" +
+ " <transition to='t'/>" +
+ " </start-state>" +
+ " <task-node name='t'>" +
+ " <task>" +
+ " <controller class='"+TestController.class.getName()+"'/>" +
+ " </task>" +
+ " <transition to='end'/>" +
+ " </task-node>" +
+ " <state name='end' />" +
+ "</process-definition>"
+ );
+ // create the process instance
+ ProcessInstance processInstance = new ProcessInstance(processDefinition);
+ processInstance.signal();
+
+ TaskInstance ti = (TaskInstance) processInstance.getTaskMgmtInstance().getTaskInstances().iterator().next();
+ ti.end();
+
+ List expectedLogs = new ArrayList();
+ expectedLogs.add("before task controller initialization");
+ expectedLogs.add("initializing task variables for TaskInstance(t)");
+ expectedLogs.add("after task controller initialization");
+ expectedLogs.add("before task controller submission");
+ expectedLogs.add("submitting task variables for TaskInstance(t)");
+ expectedLogs.add("after task controller submission");
+
+ assertEquals(expectedLogs.get(0),logs.get(0));
+ assertEquals(expectedLogs.get(1),logs.get(1));
+ assertEquals(expectedLogs.get(2),logs.get(2));
+ assertEquals(expectedLogs.get(3),logs.get(3));
+ assertEquals(expectedLogs.get(4),logs.get(4));
+ assertEquals(expectedLogs.get(5),logs.get(5));
+ }
- public void testNodeBehaviour() {
+ public void testNodeBehaviour()
+ {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state name='start'>" +
@@ -124,7 +154,8 @@
assertEquals(expectedLogs, logs);
}
- public void testReferencedNodeBehaviour() {
+ public void testReferencedNodeBehaviour()
+ {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state name='start'>" +
@@ -150,7 +181,8 @@
assertEquals(expectedLogs, logs);
}
- public void testReferencedAction() {
+ public void testReferencedAction()
+ {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state name='start'>" +
@@ -178,15 +210,8 @@
assertEquals(expectedLogs, logs);
}
- public static class TestAssignment implements AssignmentHandler {
- private static final long serialVersionUID = 1L;
- public void assign(Assignable assignable, ExecutionContext executionContext) throws Exception {
- logs.add("assigning "+assignable);
- assignable.setActorId("shipper");
- }
- }
-
- public void testInterceptAssignment() {
+ public void testInterceptAssignment()
+ {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state name='start'>" +
@@ -207,84 +232,89 @@
List expectedLogs = new ArrayList();
expectedLogs.add("before assignment");
- expectedLogs.add("assigning TaskInstance[t]");
+ expectedLogs.add("assigning TaskInstance(t)");
expectedLogs.add("after assignment");
assertEquals(expectedLogs, logs);
}
- public static class TestController implements TaskControllerHandler {
+ public static class TestInterceptor implements UserCodeInterceptor
+ {
+
+ public void executeAction(Action action, ExecutionContext executionContext) throws Exception
+ {
+ logs.add("before action " + action.getName() + " in node " + executionContext.getNode().getName());
+ action.execute(executionContext);
+ logs.add("after action " + action.getName() + " in node " + executionContext.getNode().getName());
+ }
+
+ public void executeAssignment(AssignmentHandler assignmentHandler, Assignable assignable, ExecutionContext executionContext) throws Exception
+ {
+ logs.add("before assignment");
+ assignmentHandler.assign(assignable, executionContext);
+ logs.add("after assignment");
+ }
+
+ public void executeTaskControllerInitialization(TaskControllerHandler taskControllerHandler, TaskInstance taskInstance, ContextInstance contextInstance, Token token)
+ {
+ logs.add("before task controller initialization");
+ taskControllerHandler.initializeTaskVariables(taskInstance, contextInstance, token);
+ logs.add("after task controller initialization");
+ }
+
+ public void executeTaskControllerSubmission(TaskControllerHandler taskControllerHandler, TaskInstance taskInstance, ContextInstance contextInstance, Token token)
+ {
+ logs.add("before task controller submission");
+ taskControllerHandler.submitTaskVariables(taskInstance, contextInstance, token);
+ logs.add("after task controller submission");
+ }
+ }
+
+ public static class TestAction implements ActionHandler
+ {
private static final long serialVersionUID = 1L;
- public void initializeTaskVariables(TaskInstance taskInstance, ContextInstance contextInstance, Token token) {
- logs.add("initializing task variables for "+taskInstance);
+
+ public void execute(ExecutionContext executionContext) throws Exception
+ {
+ logs.add("action executed");
}
- public void submitTaskVariables(TaskInstance taskInstance, ContextInstance contextInstance, Token token) {
- logs.add("submitting task variables for "+taskInstance);
+ }
+
+ public static class TestAutoAction implements ActionHandler
+ {
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ExecutionContext executionContext) throws Exception
+ {
+ logs.add("auto action executed");
+ executionContext.leaveNode();
}
}
-
- public void testInterceptControllerInitialization() {
- ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
- "<process-definition>" +
- " <start-state name='start'>" +
- " <transition to='t'/>" +
- " </start-state>" +
- " <task-node name='t'>" +
- " <task>" +
- " <controller class='"+TestController.class.getName()+"'/>" +
- " </task>" +
- " <transition to='end'/>" +
- " </task-node>" +
- " <state name='end' />" +
- "</process-definition>"
- );
- // create the process instance
- ProcessInstance processInstance = new ProcessInstance(processDefinition);
- processInstance.signal();
-
- List expectedLogs = new ArrayList();
- expectedLogs.add("before task controller initialization");
- expectedLogs.add("initializing task variables for TaskInstance[t]");
- expectedLogs.add("after task controller initialization");
-
- assertEquals(expectedLogs,logs);
+
+ public static class TestAssignment implements AssignmentHandler
+ {
+ private static final long serialVersionUID = 1L;
+
+ public void assign(Assignable assignable, ExecutionContext executionContext) throws Exception
+ {
+ logs.add("assigning " + assignable);
+ assignable.setActorId("shipper");
+ }
}
- public void testInterceptControllerSubmission() {
- ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
- "<process-definition>" +
- " <start-state name='start'>" +
- " <transition to='t'/>" +
- " </start-state>" +
- " <task-node name='t'>" +
- " <task>" +
- " <controller class='"+TestController.class.getName()+"'/>" +
- " </task>" +
- " <transition to='end'/>" +
- " </task-node>" +
- " <state name='end' />" +
- "</process-definition>"
- );
- // create the process instance
- ProcessInstance processInstance = new ProcessInstance(processDefinition);
- processInstance.signal();
+ public static class TestController implements TaskControllerHandler
+ {
+ private static final long serialVersionUID = 1L;
- TaskInstance ti = (TaskInstance) processInstance.getTaskMgmtInstance().getTaskInstances().iterator().next();
- ti.end();
+ public void initializeTaskVariables(TaskInstance taskInstance, ContextInstance contextInstance, Token token)
+ {
+ logs.add("initializing task variables for " + taskInstance);
+ }
- List expectedLogs = new ArrayList();
- expectedLogs.add("before task controller initialization");
- expectedLogs.add("initializing task variables for TaskInstance[t]");
- expectedLogs.add("after task controller initialization");
- expectedLogs.add("before task controller submission");
- expectedLogs.add("submitting task variables for TaskInstance[t]");
- expectedLogs.add("after task controller submission");
-
- assertEquals(expectedLogs.get(0),logs.get(0));
- assertEquals(expectedLogs.get(1),logs.get(1));
- assertEquals(expectedLogs.get(2),logs.get(2));
- assertEquals(expectedLogs.get(3),logs.get(3));
- assertEquals(expectedLogs.get(4),logs.get(4));
- assertEquals(expectedLogs.get(5),logs.get(5));
+ public void submitTaskVariables(TaskInstance taskInstance, ContextInstance contextInstance, Token token)
+ {
+ logs.add("submitting task variables for " + taskInstance);
+ }
}
+
}
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/perf/PerfWithoutDbTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/perf/PerfWithoutDbTest.java 2008-09-10 06:04:08 UTC (rev 2156)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/perf/PerfWithoutDbTest.java 2008-09-10 07:07:31 UTC (rev 2157)
@@ -1,5 +1,7 @@
package org.jbpm.perf;
+import java.io.FileWriter;
+import java.io.PrintWriter;
import java.util.Collection;
import junit.framework.TestCase;
@@ -11,56 +13,64 @@
import org.jbpm.graph.exe.Token;
import org.jbpm.taskmgmt.exe.TaskInstance;
-public class PerfWithoutDbTest extends TestCase {
+public class PerfWithoutDbTest extends TestCase
+{
- JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
- "<jbpm-configuration><jbpm-context /></jbpm-configuration>"
- );
+ JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString("<jbpm-configuration><jbpm-context /></jbpm-configuration>");
- ProcessDefinition processDefinition = parseWebSale();
+ ProcessDefinition processDefinition = parseWebSale();
- /* this test tests/shows the memory consumption
-
- public void testLoop() throws Exception {
+ /*
+ * this test tests/shows the memory consumption
+ */
+ public void testMemory() throws Exception
+ {
PrintWriter out = new PrintWriter(new FileWriter("mem.txt"));
int i = 1;
long total = 0;
- while (true) {
+ while (true)
+ {
long start = System.currentTimeMillis();
executeWebSale();
long stop = System.currentTimeMillis();
long freeMemory = Runtime.getRuntime().freeMemory();
- long millis = stop-start;
+ long millis = stop - start;
String avg;
- if (i>20) {
+ if (i > 20)
+ {
total += millis;
- avg = Float.toString((float)total/(float)(i-20));
- } else {
+ avg = Float.toString((float)total / (float)(i - 20));
+ }
+ else
+ {
avg = "";
}
+
+ String msg = i + " " + millis + " " + freeMemory + " " + avg;
- String msg = i+" "+millis+" "+freeMemory+" "+avg;
- // System.out.println(msg);
- out.println(msg);
+ // System.out.println(msg);
+ out.println(msg);
out.flush();
System.gc();
i++;
}
}
- */
/** this test shows the performance */
- public void testLoop() throws Exception {
-
+ public void testPerformance() throws Exception
+ {
+
int nbrOfExecutions = 1000;
int i = 0;
long start = System.currentTimeMillis();
- while (true) {
+ while (true)
+ {
executeWebSale();
- if (i>nbrOfExecutions) {
+ if (i > nbrOfExecutions)
+ {
long elapsed = System.currentTimeMillis() - start;
// System.out.println(Float.toString((float)nbrOfExecutions/(float)elapsed));
i = 0;
@@ -70,52 +80,63 @@
}
}
- void executeWebSale() {
+ void executeWebSale()
+ {
ProcessInstance processInstance;
-
+
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
- try {
+ try
+ {
processInstance = new ProcessInstance(processDefinition);
TaskInstance taskInstance = processInstance.getTaskMgmtInstance().createStartTaskInstance();
taskInstance.setVariable("item", "cookies");
taskInstance.setVariable("quantity", "lots of them");
taskInstance.setVariable("address", "46 Main St.");
taskInstance.end();
- } finally {
+ }
+ finally
+ {
jbpmContext.close();
}
jbpmContext = jbpmConfiguration.createJbpmContext();
- try {
+ try
+ {
Token token = processInstance.getRootToken();
Collection taskInstances = processInstance.getTaskMgmtInstance().getUnfinishedTasks(token);
- TaskInstance taskInstance = (TaskInstance) taskInstances.iterator().next();
+ TaskInstance taskInstance = (TaskInstance)taskInstances.iterator().next();
taskInstance.end("OK");
- } finally {
+ }
+ finally
+ {
jbpmContext.close();
}
-
+
jbpmContext = jbpmConfiguration.createJbpmContext();
- try {
+ try
+ {
Token token = processInstance.getRootToken();
Token shipping = token.getChild("payment");
Collection taskInstances = processInstance.getTaskMgmtInstance().getUnfinishedTasks(shipping);
- TaskInstance taskInstance = (TaskInstance) taskInstances.iterator().next();
+ TaskInstance taskInstance = (TaskInstance)taskInstances.iterator().next();
taskInstance.end();
- } finally {
+ }
+ finally
+ {
jbpmContext.close();
}
}
-
- ProcessDefinition parseWebSale() {
+ ProcessDefinition parseWebSale()
+ {
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
- try {
- ProcessDefinition processDefinition =
- ProcessDefinition.parseXmlResource("org/jbpm/perf/memleaktest.processdefinition.xml");
-
+ try
+ {
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("org/jbpm/perf/memleaktest.processdefinition.xml");
return processDefinition;
- } finally {
+ }
+ finally
+ {
jbpmContext.close();
}
}
Deleted: jbpm3/trunk/modules/core/src/test/resources/org/jbpm/perf/.gpd.memleaktest.processdefinition.xml
===================================================================
--- jbpm3/trunk/modules/core/src/test/resources/org/jbpm/perf/.gpd.memleaktest.processdefinition.xml 2008-09-10 06:04:08 UTC (rev 2156)
+++ jbpm3/trunk/modules/core/src/test/resources/org/jbpm/perf/.gpd.memleaktest.processdefinition.xml 2008-09-10 07:07:31 UTC (rev 2157)
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<process-diagram />
\ No newline at end of file
Added: jbpm3/trunk/modules/core/src/test/resources/org/jbpm/perf/memleaktest.processdefinition.xml
===================================================================
--- jbpm3/trunk/modules/core/src/test/resources/org/jbpm/perf/memleaktest.processdefinition.xml (rev 0)
+++ jbpm3/trunk/modules/core/src/test/resources/org/jbpm/perf/memleaktest.processdefinition.xml 2008-09-10 07:07:31 UTC (rev 2157)
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+
+<process-definition name="websale"
+ xmlns="urn:jbpm.org:jpdl-3.1">
+
+ <!-- SWIMLANES (= process roles) -->
+
+ <swimlane name="buyer" />
+
+ <swimlane name="salesman">
+ <assignment actor-id="manager" />
+ </swimlane>
+
+ <swimlane name="accountant">
+ <assignment actor-id="shipper" />
+ </swimlane>
+
+ <swimlane name="shipper">
+ <assignment actor-id="admin" />
+ </swimlane>
+
+ <!-- NODES -->
+
+ <start-state name="Create new web sale order">
+ <task swimlane="buyer" />
+ <transition to="Evaluate web order" />
+ </start-state>
+
+ <task-node name="Evaluate web order">
+ <task swimlane="salesman">
+ </task>
+ <transition name="OK" to="salefork" />
+ <transition name="More info needed" to="Fix web order data" />
+ </task-node>
+
+ <task-node name="Fix web order data">
+ <task swimlane="buyer" />
+ <transition to="Evaluate web order" />
+ </task-node>
+
+ <fork name="salefork">
+ <transition name="payment" to="Wait for money" />
+ <transition name="shipping" to="ship item" />
+ </fork>
+
+ <task-node name="Wait for money">
+ <task swimlane="accountant" />
+ <transition to="update books" />
+ </task-node>
+
+ <node name="update books">
+ <action class="org.jbpm.websale.UpdateBooks">
+ <msg>accountancy application is now informed of the payment</msg>
+ </action>
+ <transition to="salejoin" />
+ </node>
+
+ <node name="ship item">
+ <action class="org.jbpm.websale.ShipItem">
+ <swimlaneName>shipper</swimlaneName>
+ <msg>${shipper} now ships ${item} to ${address}</msg>
+ </action>
+ <transition to="salejoin" />
+ </node>
+
+ <join name="salejoin">
+ <transition to="end" />
+ </join>
+
+ <end-state name="end" />
+
+</process-definition>
Property changes on: jbpm3/trunk/modules/core/src/test/resources/org/jbpm/perf/memleaktest.processdefinition.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 7 months
JBoss JBPM SVN: r2156 - jbpm3/trunk/modules/enterprise.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-09-10 02:04:08 -0400 (Wed, 10 Sep 2008)
New Revision: 2156
Modified:
jbpm3/trunk/modules/enterprise/.classpath
Log:
removed 'main' and 'test' entries from classpath
Modified: jbpm3/trunk/modules/enterprise/.classpath
===================================================================
--- jbpm3/trunk/modules/enterprise/.classpath 2008-09-10 06:02:26 UTC (rev 2155)
+++ jbpm3/trunk/modules/enterprise/.classpath 2008-09-10 06:04:08 UTC (rev 2156)
@@ -1,9 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="output" path="target/classes"/>
17 years, 7 months
JBoss JBPM SVN: r2155 - in jbpm3/trunk/modules: core/src/main/java/org/jbpm/graph/node and 7 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-09-10 02:02:26 -0400 (Wed, 10 Sep 2008)
New Revision: 2155
Added:
jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/JmsMessageTest.java
Removed:
jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/GetCurrentTime.java
jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java
Modified:
jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/web.xml
jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/node/Decision.java
jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
jbpm3/trunk/modules/enterprise/ear/pom.xml
jbpm3/trunk/modules/enterprise/jar/pom.xml
jbpm3/trunk/modules/enterprise/jar/src/main/resources/META-INF/ejb-jar.xml
jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/ActionRecorder.java
jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/Recorder.java
jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java
Log:
[JBPM-1717] removed duplicate artifacts in enterprise installation
added new methods to jms message service test case
revised console and enterprise deployment descriptors
Modified: jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/web.xml
===================================================================
--- jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/web.xml 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/web.xml 2008-09-10 06:02:26 UTC (rev 2155)
@@ -4,8 +4,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
- <!-- Enable the JSF servlet. See faces-config.xml for Faces-specific configuration -->
<servlet>
+ <description>Enable the JSF servlet. See faces-config.xml for Faces-specific configuration</description>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
@@ -23,14 +23,14 @@
<url-pattern>/sa/pi/*</url-pattern>
</servlet-mapping>
- <!-- Use Documents Saved as *.xhtml -->
<context-param>
+ <description> Use Documents Saved as *.xhtml </description>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
- <!-- Facelets debug output -->
<context-param>
+ <description> Facelets debug output </description>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
@@ -40,8 +40,8 @@
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
- <!-- This is the GDP's deployer servlet -->
<servlet>
+ <description> This is the GDP's deployer servlet </description>
<servlet-name>GDP Deployer Servlet</servlet-name>
<servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
<load-on-startup>1</load-on-startup>
@@ -64,11 +64,11 @@
</security-role>
<!--
- Security constraints - uncomment and optionally customize the role name to require
+ Security constraints - optionally customize the role name to require
a login before access is allowed to the application.
Also, be sure to edit jboss-web.xml to configure the security domain if you are
- deploying inside JBossAS.
+ deploying inside JBoss AS.
-->
<security-constraint>
<web-resource-collection>
@@ -81,7 +81,6 @@
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
- <!-- end security constraints -->
<!-- Example Login page - lists user names -->
<login-config>
@@ -91,7 +90,6 @@
<form-error-page>/ua/login-example.jsf?error=true</form-error-page>
</form-login-config>
</login-config>
- <!-- End Example Login page - lists user names -->
<!-- Login configuration option #1 - use the login page ==>
<login-config>
@@ -101,16 +99,16 @@
<form-error-page>/ua/login.jsf?error=true</form-error-page>
</form-login-config>
</login-config>
- <!== End Login configuration option #1 -->
+ <!== Login configuration option #1 -->
<!-- Login configuration option #2 - use basic auth ==>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>jBPM Administration Console</realm-name>
</login-config>
- <!== End Login configuration option #2 -->
+ <!== Login configuration option #2 -->
- <!-- Job executor launcher (begin) ===
+ <!-- Job executor launcher ==>
<listener>
<description>
Starts the job executor on servlet context initialization and stops it on
@@ -118,7 +116,7 @@
</description>
<listener-class>org.jbpm.web.JobExecutorLauncher</listener-class>
</listener>
- ==== Job executor launcher (end) -->
+ <!== Job executor launcher -->
<listener>
<description>
@@ -129,7 +127,7 @@
<listener-class>org.jbpm.web.JbpmConfigurationCloser</listener-class>
</listener>
- <!-- Job executor servlet (begin) ===
+ <!-- Job executor servlet ==>
<servlet>
<description>
This servlet has the purpose of executing pending jobs. Deprecated,
@@ -143,52 +141,51 @@
<servlet-name>JobExecutorServlet</servlet-name>
<url-pattern>/jobs</url-pattern>
</servlet-mapping>
- ==== Job executor servlet (end) -->
+ <!== Job executor servlet -->
- <resource-ref>
- <description>
+ <resource-ref>
+ <description>
Logical name of the data source that provides connections to the persistence service.
Must match the hibernate.connection.datasource property in the Hibernate
configuration file.
- </description>
- <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
+ </description>
+ <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
- <!-- This section is so that the web console can deploy in the jbpm-enterprise.ear module -->
- <resource-ref>
- <description>
+ <resource-ref>
+ <description>
Logical name of the factory that provides JMS connections to the message service.
Required for processes that contain asynchronous continuations.
- </description>
- <res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
- <res-type>javax.jms.ConnectionFactory</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
+ </description>
+ <res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
+ <res-type>javax.jms.ConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
- <ejb-local-ref>
- <description>
+ <ejb-local-ref>
+ <description>
Link to the local entity bean that implements the scheduler service. Required for
processes that contain timers.
- </description>
- <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
- <ejb-ref-type>Entity</ejb-ref-type>
- <local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
- <local>org.jbpm.ejb.LocalTimerEntity</local>
- <ejb-link>TimerEntityBean</ejb-link>
- </ejb-local-ref>
+ </description>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
+ <local>org.jbpm.ejb.LocalTimerEntity</local>
+ <ejb-link>TimerEntityBean</ejb-link>
+ </ejb-local-ref>
- <message-destination-ref>
- <description>
+ <message-destination-ref>
+ <description>
The message service sends job messages to the queue referenced here. To ensure
this is the same queue from which the JobListenerBean receives messages, the
message-destination-link element points to a common logical destination, JobQueue.
</description>
- <message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
- <message-destination-type>javax.jms.Queue</message-destination-type>
- <message-destination-usage>Produces</message-destination-usage>
- <message-destination-link>JobQueue</message-destination-link>
- </message-destination-ref>
+ <message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
+ <message-destination-type>javax.jms.Queue</message-destination-type>
+ <message-destination-usage>Produces</message-destination-usage>
+ <message-destination-link>JobQueue</message-destination-link>
+ </message-destination-ref>
</web-app>
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/node/Decision.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/node/Decision.java 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/node/Decision.java 2008-09-10 06:02:26 UTC (rev 2155)
@@ -70,15 +70,6 @@
}
}
- String getConditionExpression(Element conditionElement) {
- String expression = conditionElement.attributeValue("expression");
- if (expression!=null) {
- return expression;
- } else {
- return conditionElement.getText();
- }
- }
-
public void execute(ExecutionContext executionContext) {
Transition transition = null;
Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-09-10 06:02:26 UTC (rev 2155)
@@ -9,7 +9,7 @@
<appversion>@{product.version}</appversion>
<uninstaller name="remove.task" write="yes" />
</info>
- <guiprefs width="600" height="480" resizable="no">
+ <guiprefs width="600" height="440" resizable="yes">
<!--
<laf name="kunststoff">
<os family="unix" />
@@ -153,11 +153,6 @@
<pack name="jBPM3 Server Components" required="yes" preselected="yes">
<description>The jBPM3 Server Components</description>
- <!-- jbpm -->
- <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm" override="true">
- <include name="jbpm-enterprise.jar" />
- </fileset>
-
<!-- jbpm/jbpm-service.sar -->
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar"
override="true">
@@ -170,8 +165,7 @@
<!-- jbpm/jbpm-enterprise.ear -->
<file src="@{deploy.artifacts.dir}/lib/jbpm-enterprise-archive.zip" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-enterprise-archive.ear"
- unpack="true" override="true">
- </file>
+ unpack="true" override="true" />
<!-- jbpm/jbpm-userguide.war -->
<file src="@{deploy.artifacts.dir}/lib/jbpm-userguide.zip" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-userguide.war"
Modified: jbpm3/trunk/modules/enterprise/ear/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/ear/pom.xml 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/enterprise/ear/pom.xml 2008-09-10 06:02:26 UTC (rev 2155)
@@ -33,6 +33,12 @@
<artifactId>jbpm-enterprise-beans</artifactId>
<version>${version}</version>
<type>ejb</type>
+ <exclusions>
+ <exclusion>
+ <artifactId>jbpm-core</artifactId>
+ <groupId>org.jboss.jbpm</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.jbpm</groupId>
@@ -40,33 +46,6 @@
<version>${version}</version>
<type>war</type>
</dependency>
- <dependency>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-core</artifactId>
- <version>${version}</version>
- <exclusions>
- <exclusion>
- <groupId>bsh</groupId>
- <artifactId>bsh</artifactId>
- </exclusion>
- <exclusion>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.jackrabbit</groupId>
- <artifactId>jackrabbit-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
</dependencies>
<!-- Plugins -->
@@ -78,10 +57,6 @@
<generateApplicationXml>true</generateApplicationXml>
<version>1.4</version>
<modules>
- <jarModule>
- <groupId>org.jboss.jbpm</groupId>
- <artifactId>jbpm-core</artifactId>
- </jarModule>
<ejbModule>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-enterprise-beans</artifactId>
Modified: jbpm3/trunk/modules/enterprise/jar/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-09-10 06:02:26 UTC (rev 2155)
@@ -16,7 +16,7 @@
<name>JBoss jBPM - Enterprise Beans</name>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-enterprise-beans</artifactId>
- <packaging>ejb</packaging>
+ <packaging>jar</packaging>
<!-- Parent -->
<parent>
@@ -161,20 +161,11 @@
<configuration>
<excludes>
<exclude>jbpm.cfg.xml</exclude>
- <exclude>hibernate.*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <!-- https://jira.jboss.org/jira/browse/JBPM-1708 -->
- <exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude>
- <!-- https://jira.jboss.org/jira/browse/JBPM-1709 -->
- <exclude>org/jbpm/msg/jms/AsyncProcessingTest.java</exclude>
- </excludes>
- </configuration>
</plugin>
</plugins>
</build>
Modified: jbpm3/trunk/modules/enterprise/jar/src/main/resources/META-INF/ejb-jar.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/main/resources/META-INF/ejb-jar.xml 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/enterprise/jar/src/main/resources/META-INF/ejb-jar.xml 2008-09-10 06:02:26 UTC (rev 2155)
@@ -21,7 +21,8 @@
<ejb-class>org.jbpm.ejb.impl.CommandServiceBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
- <!--
+
+ <!-- Configuration resource ==>
<env-entry>
<description>
The classpath resource from which to read the jBPM configuration. Optional, defaults to
@@ -31,7 +32,8 @@
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>jbpm.cfg.xml</env-entry-value>
</env-entry>
- -->
+ <!== Configuration resource -->
+
<ejb-local-ref>
<description>
Link to the local entity bean that implements the scheduler service. Required for
@@ -43,6 +45,8 @@
<local>org.jbpm.ejb.LocalTimerEntity</local>
<ejb-link>TimerEntityBean</ejb-link>
</ejb-local-ref>
+
+ <!-- Timer service bean ==>
<ejb-local-ref>
<description>
Link to the local session bean that implements the scheduler service. Deprecated, replaced
@@ -54,6 +58,8 @@
<local>org.jbpm.scheduler.ejbtimer.LocalTimerService</local>
<ejb-link>TimerServiceBean</ejb-link>
</ejb-local-ref>
+ <!== Timer service bean -->
+
<resource-ref>
<description>
Logical name of the data source that provides connections to the persistence service. Must
@@ -63,6 +69,7 @@
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
+
<resource-ref>
<description>
Logical name of the factory that provides JMS connections to the message service. Required
@@ -72,6 +79,7 @@
<res-type>javax.jms.ConnnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
+
<message-destination-ref>
<description>
The message service sends job messages to the queue referenced here. To ensure this is the
@@ -85,6 +93,7 @@
</message-destination-ref>
</session>
+ <!-- Timer service bean ==>
<session>
<description>
Interacts with the EJB timer service to schedule jBPM timers. Deprecated, replaced by the
@@ -97,6 +106,7 @@
<ejb-class>org.jbpm.scheduler.ejbtimer.TimerServiceBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
+
<ejb-local-ref>
<description>
Link to the session bean that executes timers on a separate context.
@@ -108,6 +118,7 @@
<ejb-link>CommandServiceBean</ejb-link>
</ejb-local-ref>
</session>
+ <!== Timer service bean -->
<message-driven>
<description>
@@ -118,6 +129,7 @@
<ejb-class>org.jbpm.ejb.impl.CommandListenerBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
+
<ejb-local-ref>
<description>
Link to the local session bean that executes commands on a separate context.
@@ -128,6 +140,7 @@
<local>org.jbpm.ejb.LocalCommandService</local>
<ejb-link>CommandServiceBean</ejb-link>
</ejb-local-ref>
+
<resource-ref>
<description>
Logical name of the factory that provides JMS connections for producing result messages.
@@ -137,6 +150,7 @@
<res-type>javax.jms.ConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
+
<message-destination-ref>
<description>
Messages which do not contain a command are sent to the queue referenced here. Optional;
@@ -159,6 +173,7 @@
<transaction-type>Container</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
<message-destination-link>JobQueue</message-destination-link>
+
<ejb-local-ref>
<description>
Link to the local session bean that executes jobs on a separate context.
@@ -169,6 +184,7 @@
<local>org.jbpm.ejb.LocalCommandService</local>
<ejb-link>CommandServiceBean</ejb-link>
</ejb-local-ref>
+
<resource-ref>
<description>
Logical name of the factory that provides JMS connections for producing result messages.
@@ -178,6 +194,7 @@
<res-type>javax.jms.ConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
+
<message-destination-ref>
<description>
Messages which do not contain a job ID are sent to the queue referenced here. Optional; if
@@ -217,6 +234,7 @@
<field-name>discriminator</field-name>
</cmp-field>
<primkey-field>timerId</primkey-field>
+
<ejb-local-ref>
<description>
Link to the session bean that executes timers on a separate context.
@@ -227,6 +245,7 @@
<local>org.jbpm.ejb.LocalCommandService</local>
<ejb-link>CommandServiceBean</ejb-link>
</ejb-local-ref>
+
<query>
<description>Retrieve all timers by token identifier</description>
<query-method>
@@ -241,6 +260,7 @@
where obj.tokenId = ?1 and obj.discriminator = 84
]]></ejb-ql>
</query>
+
<query>
<description>Retrieve all timers by token identifier and name</description>
<query-method>
@@ -256,6 +276,7 @@
where obj.tokenId = ?1 and obj.name = ?2 and obj.discriminator = 84
]]></ejb-ql>
</query>
+
<query>
<description>Retrieve all timers by process instance identifier</description>
<query-method>
@@ -284,6 +305,7 @@
<trans-attribute>Required</trans-attribute>
</container-transaction>
+ <!-- Timer service bean ==>
<container-transaction>
<method>
<ejb-name>TimerServiceBean</ejb-name>
@@ -291,6 +313,7 @@
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
+ <!== Timer service bean -->
<container-transaction>
<method>
Modified: jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/ActionRecorder.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/ActionRecorder.java 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/ActionRecorder.java 2008-09-10 06:02:26 UTC (rev 2155)
@@ -28,7 +28,7 @@
private static final long serialVersionUID = 1L;
- public void record(String processInstanceId, ExecutionContext executionContext) {
+ public void record(long processInstanceId, ExecutionContext executionContext) {
Action action = executionContext.getAction();
String actionName = action.getName();
collectedResults.add(processInstanceId+actionName);
Deleted: jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/GetCurrentTime.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/GetCurrentTime.java 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/GetCurrentTime.java 2008-09-10 06:02:26 UTC (rev 2155)
@@ -1,34 +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.enterprise.test;
-
-import org.jbpm.graph.def.ActionHandler;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.util.Clock;
-
-public class GetCurrentTime implements ActionHandler {
- String variable;
- private static final long serialVersionUID = 1L;
- public void execute(ExecutionContext executionContext) throws Exception {
- executionContext.setVariable(variable, Clock.getCurrentTime());
- }
-}
\ No newline at end of file
Modified: jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/Recorder.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/Recorder.java 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/enterprise/test/Recorder.java 2008-09-10 06:02:26 UTC (rev 2155)
@@ -32,7 +32,7 @@
public class Recorder implements ActionHandler {
private static final long serialVersionUID = 1L;
-
+
public static Set collectedProcessInstanceIds = null;
public static Set collectedResults = null;
public volatile static int executions = 0;
@@ -47,12 +47,12 @@
synchronized (Recorder.class) {
executions++;
}
- String id = (String) Long.toString(executionContext.getProcessInstance().getId());
- collectedProcessInstanceIds.add(id);
- record(id, executionContext);
+ long processInstanceId = executionContext.getProcessInstance().getId();
+ collectedProcessInstanceIds.add(new Long(processInstanceId));
+ record(processInstanceId, executionContext);
}
- public void record(String processInstanceId, ExecutionContext executionContext) {
+ public void record(long processInstanceId, ExecutionContext executionContext) {
String nodeName = executionContext.getNode().getName();
collectedResults.add(processInstanceId+nodeName);
executionContext.leaveNode();
Deleted: jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java 2008-09-10 06:02:26 UTC (rev 2155)
@@ -1,208 +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.msg.jms;
-
-import java.rmi.RemoteException;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.TreeSet;
-
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
-
-import org.apache.cactus.ServletTestCase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hibernate.Session;
-import org.jbpm.IntegrationTestSetup;
-import org.jbpm.JbpmContext;
-import org.jbpm.command.Command;
-import org.jbpm.command.DeployProcessCommand;
-import org.jbpm.command.StartProcessInstanceCommand;
-import org.jbpm.ejb.RemoteCommandService;
-import org.jbpm.ejb.RemoteCommandServiceHome;
-import org.jbpm.enterprise.test.ActionRecorder;
-import org.jbpm.enterprise.test.Recorder;
-
-public class AsyncProcessingTest extends ServletTestCase {
-
- private RemoteCommandService commandService;
-
- static int nbrOfConcurrentProcessExecutions = 20;
- static int maxWaitTime = 30000;
-
- public static Test suite() throws Exception {
- return new IntegrationTestSetup(AsyncProcessingTest.class, "enterprise-test.war, enterprise-test.jar");
- }
-
- protected void setUp() throws Exception {
- InitialContext initialContext = new InitialContext();
- RemoteCommandServiceHome localCommandServiceHome = (RemoteCommandServiceHome) initialContext.lookup("ejb/CommandServiceBean");
- commandService = localCommandServiceHome.create();
- }
-
- public void testBulkJobs() throws RemoteException {
- Recorder.resetCollections();
- deleteAllJobs();
- deployProcess();
- launchProcesses();
- processAllJobs(maxWaitTime);
- Set expectedResults = createExpectedResults();
- assertEquals(Recorder.collectedProcessInstanceIds.toString()+" wasn't the expected size: "+nbrOfConcurrentProcessExecutions, nbrOfConcurrentProcessExecutions, Recorder.collectedProcessInstanceIds.size());
- assertEquals(expectedResults, Recorder.collectedResults);
- }
-
- protected void deleteAllJobs() throws RemoteException {
- execute( new Command() {
- private static final long serialVersionUID = 1L;
- public Object execute(JbpmContext jbpmContext) throws Exception {
- Session session = jbpmContext.getSession();
- session.createQuery("delete from org.jbpm.job.Job").executeUpdate();
- return null;
- }
- });
- }
-
- protected Object execute(Command command) throws RemoteException {
- return commandService.execute(command);
- }
-
-
- protected void deployProcess() throws RemoteException {
- log.debug("start deploy process");
- execute(new DeployProcessCommand(
- "<process-definition name='bulk messages'>" +
- " <start-state>" +
- " <transition to='a' />" +
- " </start-state>" +
- " <node name='a' async='true'>" +
- " <action class='"+Recorder.class.getName()+"' />" +
- " <transition to='b' />" +
- " </node>" +
- " <node name='b' async='true'>" +
- " <event type='node-enter'>" +
- " <action name='X' async='true' class='"+ActionRecorder.class.getName()+"' />" +
- " </event>" +
- " <action class='"+Recorder.class.getName()+"' />" +
- " <transition to='c' />" +
- " </node>" +
- " <node name='c' async='true'>" +
- " <action class='"+Recorder.class.getName()+"' />" +
- " <transition to='d'>" +
- " <action name='Y' async='true' class='"+ActionRecorder.class.getName()+"' />" +
- " </transition>" +
- " </node>" +
- " <node name='d' async='true'>" +
- " <action class='"+Recorder.class.getName()+"' />" +
- " <transition to='e' />" +
- " <event type='node-leave'>" +
- " <action name='Z' async='true' class='"+ActionRecorder.class.getName()+"' />" +
- " </event>" +
- " </node>" +
- " <node name='e' async='true'>" +
- " <action class='"+Recorder.class.getName()+"' />" +
- " <transition to='end' />" +
- " </node>" +
- " <end-state name='end'/>" +
- "</process-definition>"));
- }
-
- protected void launchProcesses() throws RemoteException {
- for (int i=0; i<nbrOfConcurrentProcessExecutions; i++) {
- StartProcessInstanceCommand command = new StartProcessInstanceCommand();
- command.setProcessName("bulk messages");
- execute(command);
- }
- }
-
- protected Set createExpectedResults() {
- Set expectedResults = new TreeSet();
- Iterator iter = Recorder.collectedProcessInstanceIds.iterator();
- while (iter.hasNext()) {
- String id = (String) iter.next();
- expectedResults.add(id+"a");
- expectedResults.add(id+"b");
- expectedResults.add(id+"c");
- expectedResults.add(id+"d");
- expectedResults.add(id+"e");
- expectedResults.add(id+"X");
- expectedResults.add(id+"Y");
- expectedResults.add(id+"Z");
- }
- return expectedResults;
- }
-
- private void processAllJobs(final long maxWait) throws RemoteException {
- boolean jobsAvailable = true;
-
- // install a timer that will interrupt if it takes too long
- // if that happens, it will lead to an interrupted exception and the test will fail
- TimerTask interruptTask = new TimerTask() {
- Thread testThread = Thread.currentThread();
- public void run() {
- log.debug("test "+getName()+" took too long. going to interrupt...");
- testThread.interrupt();
- }
- };
- Timer timer = new Timer();
- timer.schedule(interruptTask, maxWait);
-
- try {
- while (jobsAvailable) {
- log.debug("going to sleep for 200 millis, waiting for the job executor to process more jobs");
- Thread.sleep(200);
- jobsAvailable = areJobsAvailable();
- }
-
- } catch (InterruptedException e) {
- fail("test execution exceeded treshold of "+maxWait+" milliseconds");
- } finally {
- timer.cancel();
- }
- }
-
- protected int getNbrOfJobsAvailable() throws RemoteException {
- Integer nbrOfJobsAvailable = (Integer) execute( new Command() {
- private static final long serialVersionUID = 1L;
- public Object execute(JbpmContext jbpmContext) throws Exception {
- Integer nbrOfJobsAvailable = null;
- Session session = jbpmContext.getSession();
- Number jobs = (Number) session.createQuery("select count(*) from org.jbpm.job.Job").uniqueResult();
- log.debug("there are '"+jobs+"' jobs currently in the job table");
- if (jobs!=null) {
- nbrOfJobsAvailable = new Integer(jobs.intValue());
- }
- return nbrOfJobsAvailable;
- }
- });
- return nbrOfJobsAvailable.intValue();
- }
-
- protected boolean areJobsAvailable() throws RemoteException {
- return (getNbrOfJobsAvailable()>0);
- }
-
- private static Log log = LogFactory.getLog(AsyncProcessingTest.class);
-}
Copied: jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/JmsMessageTest.java (from rev 2154, jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java)
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/JmsMessageTest.java (rev 0)
+++ jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/JmsMessageTest.java 2008-09-10 06:02:26 UTC (rev 2155)
@@ -0,0 +1,338 @@
+/*
+ * 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.msg.jms;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.TreeSet;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+
+import org.apache.cactus.ServletTestCase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.jbpm.IntegrationTestSetup;
+import org.jbpm.JbpmContext;
+import org.jbpm.command.Command;
+import org.jbpm.command.DeployProcessCommand;
+import org.jbpm.command.StartProcessInstanceCommand;
+import org.jbpm.ejb.LocalCommandService;
+import org.jbpm.ejb.LocalCommandServiceHome;
+import org.jbpm.enterprise.test.ActionRecorder;
+import org.jbpm.enterprise.test.EventCallback;
+import org.jbpm.enterprise.test.Recorder;
+import org.jbpm.graph.def.Event;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Exercises for the {@linkplain JmsMessageServiceImpl JMS message service}.
+ * @author Alejandro Guizar
+ */
+public class JmsMessageTest extends ServletTestCase {
+
+ private LocalCommandService commandService;
+
+ private static LocalCommandServiceHome commandServiceHome;
+
+ static final int processExecutionCount = 20;
+ static final int maxWaitTime = 30000;
+
+ public static Test suite() throws Exception {
+ return new IntegrationTestSetup(JmsMessageTest.class, "enterprise-test.war, enterprise-test.jar");
+ }
+
+ protected void setUp() throws Exception {
+ if (commandServiceHome == null) {
+ Context initialContext = new InitialContext();
+ try {
+ commandServiceHome = (LocalCommandServiceHome) initialContext.lookup("java:comp/env/ejb/CommandServiceBean");
+ }
+ finally {
+ initialContext.close();
+ }
+ }
+ commandService = commandServiceHome.create();
+ log.info("### " + getName() + " started ###");
+ }
+
+ protected void tearDown() throws Exception {
+ log.info("### " + getName() + " done ###");
+ commandService = null;
+ }
+
+ public void testAsyncNode() {
+ deployProcess("<process-definition name='node'>"
+ + " <event type='process-end'>"
+ + " <action expression='#{eventCallback.processEnd}'/>"
+ + " </event>"
+ + " <start-state name='start'>"
+ + " <transition to='a' />"
+ + " </start-state>"
+ + " <node name='a' async='true'>"
+ + " <transition to='end' />"
+ + " </node>"
+ + " <end-state name='end' />"
+ + "</process-definition>");
+ long processId = launchProcess("node").getId();
+ EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
+ assertTrue(isProcessFinished(processId));
+ }
+
+ public void testAsyncAction() {
+ Recorder.resetCollections();
+ deleteAllJobs();
+ deployProcess("<process-definition name='action'>"
+ + " <event type='process-end'>"
+ + " <action expression='#{eventCallback.processEnd}'/>"
+ + " </event>"
+ + " <start-state name='start'>"
+ + " <transition to='a' />"
+ + " </start-state>"
+ + " <node name='a'>"
+ + " <event type='node-enter'>"
+ + " <action name='X' async='true' class='" + ActionRecorder.class.getName() + "' />"
+ + " </event>"
+ + " <transition to='end' />"
+ + " </node>"
+ + " <end-state name='end' />"
+ + "</process-definition>");
+ long processId = launchProcess("action").getId();
+ assertTrue(isProcessFinished(processId));
+ // action continues in the background
+ processAllJobs(maxWaitTime);
+ assertEquals(Collections.singleton(processId + "X"), Recorder.collectedResults);
+ }
+
+ public void testAsyncSequence() {
+ deployProcess("<process-definition name='sequence'>"
+ + " <event type='process-end'>"
+ + " <action expression='#{eventCallback.processEnd}'/>"
+ + " </event>"
+ + " <start-state>"
+ + " <transition to='a' />"
+ + " </start-state>"
+ + " <node name='a' async='true'>"
+ + " <transition to='b' />"
+ + " </node>"
+ + " <node name='b' async='true'>"
+ + " <transition to='c' />"
+ + " </node>"
+ + " <node name='c' async='true'>"
+ + " <transition to='d' />"
+ + " </node>"
+ + " <node name='d' async='true'>"
+ + " <transition to='e' />"
+ + " </node>"
+ + " <node name='e' async='true'>"
+ + " <transition to='end' />"
+ + " </node>"
+ + " <end-state name='end' />"
+ + "</process-definition>");
+ long processId = launchProcess("sequence").getId();
+ EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
+ assertTrue(isProcessFinished(processId));
+ }
+
+ public void testAsyncFork() {
+ deployProcess("<process-definition name='fork'>"
+ + " <event type='process-end'>"
+ + " <action expression='#{eventCallback.processEnd}'/>"
+ + " </event>"
+ + " <start-state>"
+ + " <transition to='f' />"
+ + " </start-state>"
+ + " <fork name='f'>"
+ + " <transition name='a' to='a' />"
+ + " <transition name='b' to='b' />"
+ + " <transition name='c' to='c' />"
+ + " <transition name='d' to='d' />"
+ + " <transition name='e' to='e' />"
+ + " </fork>"
+ + " <node name='a' async='true'>"
+ + " <transition to='j' />"
+ + " </node>"
+ + " <node name='b' async='true'>"
+ + " <transition to='j' />"
+ + " </node>"
+ + " <node name='c' async='true'>"
+ + " <transition to='j' />"
+ + " </node>"
+ + " <node name='d' async='true'>"
+ + " <transition to='j' />"
+ + " </node>"
+ + " <node name='e' async='true'>"
+ + " <transition to='j' />"
+ + " </node>"
+ + " <join name='j'>"
+ + " <transition to='end' />"
+ + " </join>"
+ + " <end-state name='end' />"
+ + "</process-definition>");
+ long processId = launchProcess("fork").getId();
+ EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
+ assertTrue(isProcessFinished(processId));
+ }
+
+ public void testAsyncExecutions() {
+ Recorder.resetCollections();
+ deleteAllJobs();
+ deployProcess("<process-definition name='executions'>" +
+ " <start-state>" +
+ " <transition to='a' />" +
+ " </start-state>" +
+ " <node name='a' async='true'>" +
+ " <action class='"+Recorder.class.getName()+"' />" +
+ " <transition to='b' />" +
+ " </node>" +
+ " <node name='b' async='true'>" +
+ " <event type='node-enter'>" +
+ " <action name='X' async='true' class='"+ActionRecorder.class.getName()+"' />" +
+ " </event>" +
+ " <action class='"+Recorder.class.getName()+"' />" +
+ " <transition to='c' />" +
+ " </node>" +
+ " <node name='c' async='true'>" +
+ " <action class='"+Recorder.class.getName()+"' />" +
+ " <transition to='d'>" +
+ " <action name='Y' async='true' class='"+ActionRecorder.class.getName()+"' />" +
+ " </transition>" +
+ " </node>" +
+ " <node name='d' async='true'>" +
+ " <action class='"+Recorder.class.getName()+"' />" +
+ " <transition to='e' />" +
+ " <event type='node-leave'>" +
+ " <action name='Z' async='true' class='"+ActionRecorder.class.getName()+"' />" +
+ " </event>" +
+ " </node>" +
+ " <node name='e' async='true'>" +
+ " <action class='"+Recorder.class.getName()+"' />" +
+ " <transition to='end' />" +
+ " </node>" +
+ " <end-state name='end'/>" +
+ "</process-definition>");
+ launchProcesses("executions");
+ processAllJobs(maxWaitTime);
+ Set expectedResults = new TreeSet();
+ for (Iterator i = Recorder.collectedProcessInstanceIds.iterator(); i.hasNext();) {
+ Long processInstanceId = (Long) i.next();
+ expectedResults.add(processInstanceId+"a");
+ expectedResults.add(processInstanceId+"b");
+ expectedResults.add(processInstanceId+"c");
+ expectedResults.add(processInstanceId+"d");
+ expectedResults.add(processInstanceId+"e");
+ expectedResults.add(processInstanceId+"X");
+ expectedResults.add(processInstanceId+"Y");
+ expectedResults.add(processInstanceId+"Z");
+ }
+ assertEquals(processExecutionCount, Recorder.collectedProcessInstanceIds.size());
+ assertEquals(expectedResults, Recorder.collectedResults);
+ }
+
+ private ProcessDefinition deployProcess(String xml) {
+ return (ProcessDefinition) commandService.execute(new DeployProcessCommand(xml));
+ }
+
+ private ProcessInstance launchProcess(String processName) {
+ StartProcessInstanceCommand command = new StartProcessInstanceCommand();
+ command.setProcessName(processName);
+ command.setVariables(Collections.singletonMap("eventCallback", new EventCallback()));
+ return (ProcessInstance) commandService.execute(command);
+ }
+
+ private void launchProcesses(String processName) {
+ for (int i=0; i<processExecutionCount; i++) {
+ launchProcess(processName);
+ }
+ }
+
+ private boolean isProcessFinished(final long processId) {
+ Boolean isFinished = (Boolean) commandService.execute(new Command() {
+ private static final long serialVersionUID = 1L;
+ public Object execute(JbpmContext jbpmContext) throws Exception {
+ return jbpmContext.loadProcessInstance(processId).hasEnded();
+ }
+ });
+ return isFinished.booleanValue();
+ }
+
+ private void deleteAllJobs() {
+ commandService.execute(new Command() {
+ private static final long serialVersionUID = 1L;
+ public Object execute(JbpmContext jbpmContext) throws Exception {
+ int jobCount = jbpmContext.getSession()
+ .createQuery("delete from org.jbpm.job.Job")
+ .executeUpdate();
+ log.debug(jobCount + " jobs deleted");
+ return null;
+ }
+ });
+ }
+
+ private void processAllJobs(long maxWait) {
+ // install a timer that will interrupt if it takes too long
+ // if that happens, it will lead to an interrupted exception and the test will fail
+ TimerTask interruptTask = new TimerTask() {
+ Thread testThread = Thread.currentThread();
+ public void run() {
+ log.debug("test "+getName()+" took too long: interrupting...");
+ testThread.interrupt();
+ }
+ };
+ Timer timer = new Timer();
+ timer.schedule(interruptTask, maxWait);
+
+ try {
+ while (getAvailableJobCount() > 0) {
+ log.debug("waiting for job listener to process more jobs");
+ Thread.sleep(200);
+ }
+ } catch (InterruptedException e) {
+ fail("test execution exceeded treshold of "+maxWait+" milliseconds");
+ } finally {
+ timer.cancel();
+ }
+ }
+
+ private int getAvailableJobCount() {
+ Number jobCount = (Number) commandService.execute(new Command() {
+ private static final long serialVersionUID = 1L;
+ public Object execute(JbpmContext jbpmContext) throws Exception {
+ Object jobCount = jbpmContext.getSession()
+ .createQuery("select count(*) from org.jbpm.job.Job")
+ .uniqueResult();
+ log.debug(jobCount + " jobs remaining");
+ return jobCount;
+ }
+ });
+ return jobCount.intValue();
+ }
+
+ private static Log log = LogFactory.getLog(JmsMessageTest.class);
+}
Property changes on: jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/JmsMessageTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java 2008-09-09 14:49:37 UTC (rev 2154)
+++ jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java 2008-09-10 06:02:26 UTC (rev 2155)
@@ -40,12 +40,15 @@
import org.jbpm.ejb.LocalCommandService;
import org.jbpm.ejb.LocalCommandServiceHome;
import org.jbpm.enterprise.test.EventCallback;
-import org.jbpm.enterprise.test.GetCurrentTime;
import org.jbpm.graph.def.Event;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
+/**
+ * Exercises for the {@linkplain EntitySchedulerService EJB scheduler service}.
+ * @author Alejandro Guizar
+ */
public class EjbSchedulerTest extends ServletTestCase {
private LocalCommandService commandService;
@@ -103,16 +106,10 @@
+ " <action expression='#{eventCallback.processEnd}'/>"
+ " </event>"
+ " <start-state name='start'>"
- + " <transition to='a'>"
- + " <action class='"
- + GetCurrentTime.class.getName()
- + "'>"
- + " <variable>now</variable>"
- + " </action>"
- + " </transition>"
+ + " <transition to='a' />"
+ " </start-state>"
+ " <state name='a'>"
- + " <timer duedate='#{now} - 10 seconds' transition='timeout' />"
+ + " <timer duedate='-1 second' transition='timeout' />"
+ " <transition name='timeout' to='end' />"
+ " </state>"
+ " <end-state name='end' />"
@@ -167,15 +164,15 @@
// repeated expiration
EventCallback.waitForEvent(Event.EVENTTYPE_TIMER);
assertEquals("a", getProcessState(processId));
- cancelTimer("a", process.getRootToken().getId());
// no more expirations
+ cancelTimer("a", process.getRootToken().getId());
EventCallback.waitForEvent(Event.EVENTTYPE_TIMER, 2000);
signalProcess(processId);
assertTrue(isProcessFinished(processId));
}
- public void testScheduleMultiple() throws Exception {
- deployProcess("<process-definition name='multiple'>"
+ public void testScheduleSequence() throws Exception {
+ deployProcess("<process-definition name='sequence'>"
+ " <event type='process-end'>"
+ " <action expression='#{eventCallback.processEnd}'/>"
+ " </event>"
@@ -186,28 +183,28 @@
+ " <transition to='a' />"
+ " </start-state>"
+ " <state name='a'>"
- + " <timer duedate='500 milliseconds' transition='next' />"
- + " <transition name='next' to='b' />"
+ + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <transition name='timeout' to='b' />"
+ " </state>"
+ " <state name='b'>"
- + " <timer duedate='500 milliseconds' transition='next' />"
- + " <transition name='next' to='c' />"
+ + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <transition name='timeout' to='c' />"
+ " </state>"
+ " <state name='c'>"
- + " <timer duedate='500 milliseconds' transition='next' />"
- + " <transition name='next' to='d' />"
+ + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <transition name='timeout' to='d' />"
+ " </state>"
+ " <state name='d'>"
- + " <timer duedate='500 milliseconds' transition='next' />"
- + " <transition name='next' to='e' />"
+ + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <transition name='timeout' to='e' />"
+ " </state>"
+ " <state name='e'>"
- + " <timer duedate='500 milliseconds' transition='next' />"
- + " <transition name='next' to='end' />"
+ + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <transition name='timeout' to='end' />"
+ " </state>"
+ " <end-state name='end' />"
+ "</process-definition>");
- long processId = launchProcess("multiple").getId();
+ long processId = launchProcess("sequence").getId();
char state = 'b';
for (int i = 0; i < 4; i++) {
EventCallback.waitForEvent(Event.EVENTTYPE_TIMER);
@@ -217,8 +214,8 @@
assertTrue(isProcessFinished(processId));
}
- public void testScheduleConcurrent() throws InterruptedException {
- deployProcess("<process-definition name='concurrent'>"
+ public void testScheduleFork() throws InterruptedException {
+ deployProcess("<process-definition name='fork'>"
+ " <event type='process-end'>"
+ " <action expression='#{eventCallback.processEnd}'/>"
+ " </event>"
@@ -257,23 +254,23 @@
+ " </join>"
+ " <end-state name='end' />"
+ "</process-definition>");
- long processId = launchProcess("concurrent").getId();
+ long processId = launchProcess("fork").getId();
EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
assertTrue(isProcessFinished(processId));
}
- protected ProcessDefinition deployProcess(String xml) {
+ private ProcessDefinition deployProcess(String xml) {
return (ProcessDefinition) commandService.execute(new DeployProcessCommand(xml));
}
- protected ProcessInstance launchProcess(final String processName) {
+ private ProcessInstance launchProcess(String processName) {
StartProcessInstanceCommand command = new StartProcessInstanceCommand();
command.setProcessName(processName);
command.setVariables(Collections.singletonMap("eventCallback", new EventCallback()));
return (ProcessInstance) commandService.execute(command);
}
- protected void signalProcess(final long processId) {
+ private void signalProcess(final long processId) {
commandService.execute(new Command() {
private static final long serialVersionUID = 1L;
public Object execute(JbpmContext jbpmContext) throws Exception {
@@ -283,7 +280,7 @@
});
}
- protected String getProcessState(final long processId) {
+ private String getProcessState(final long processId) {
return (String) commandService.execute(new Command() {
private static final long serialVersionUID = 1L;
public Object execute(JbpmContext jbpmContext) throws Exception {
@@ -292,7 +289,7 @@
});
}
- protected boolean isProcessFinished(final long processId) {
+ private boolean isProcessFinished(final long processId) {
Boolean isFinished = (Boolean) commandService.execute(new Command() {
private static final long serialVersionUID = 1L;
public Object execute(JbpmContext jbpmContext) throws Exception {
@@ -302,7 +299,7 @@
return isFinished.booleanValue();
}
- protected void cancelTimer(final String timerName, final long tokenId) {
+ private void cancelTimer(final String timerName, final long tokenId) {
commandService.execute(new Command() {
private static final long serialVersionUID = 1L;
public Object execute(JbpmContext jbpmContext) throws Exception {
17 years, 7 months