JBoss JBPM SVN: r2610 - jbpm3/branches/tdiesler.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-24 11:23:02 -0400 (Fri, 24 Oct 2008)
New Revision: 2610
Modified:
jbpm3/branches/tdiesler/profiles.xml.example
Log:
wip
Modified: jbpm3/branches/tdiesler/profiles.xml.example
===================================================================
--- jbpm3/branches/tdiesler/profiles.xml.example 2008-10-24 15:18:19 UTC (rev 2609)
+++ jbpm3/branches/tdiesler/profiles.xml.example 2008-10-24 15:23:02 UTC (rev 2610)
@@ -2,8 +2,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd">
<profiles>
- <!-- [JBPM-1763] JIRA integration test -->
-
<!-- This profile can also be defined in ~/.m2/settings.xml -->
<profile>
<id>jboss-home-profile</id>
@@ -13,10 +11,7 @@
</property>
</activation>
<properties>
- <jboss422.home>/home/tdiesler/svn/jbossas/tags/JBoss_4_2_2_GA/build/output/jboss-4.2.2.GA</jboss422.home>
- <jboss423.home>/home/tdiesler/svn/jbossas/tags/JBoss_4_2_3_GA/build/output/jboss-4.2.3.GA</jboss423.home>
- <jboss500.home>/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_CR2/build/output/jboss-5.0.0.CR2</jboss500.home>
-
+ <!--
<jdbc.mysql.url>jdbc:mysql://localhost:3306/jbpmtest</jdbc.mysql.url>
<jdbc.mysql.username>jbpmtest</jdbc.mysql.username>
<jdbc.mysql.password></jdbc.mysql.password>
@@ -28,6 +23,7 @@
<jdbc.sybase.url>jdbc:jtds:sybase://dev01.qa.atl.jboss.com:4100/jbpmteam</jdbc.sybase.url>
<jdbc.sybase.username>jbpmteam</jdbc.sybase.username>
<jdbc.sybase.password>jbpmteam</jdbc.sybase.password>
+ -->
</properties>
</profile>
17 years, 6 months
JBoss JBPM SVN: r2609 - projects/spec/trunk/modules/api.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-24 11:18:19 -0400 (Fri, 24 Oct 2008)
New Revision: 2609
Modified:
projects/spec/trunk/modules/api/.project
Log:
project name
Modified: projects/spec/trunk/modules/api/.project
===================================================================
--- projects/spec/trunk/modules/api/.project 2008-10-24 14:07:20 UTC (rev 2608)
+++ projects/spec/trunk/modules/api/.project 2008-10-24 15:18:19 UTC (rev 2609)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jbpm-api</name>
+ <name>jbpm-spec-api</name>
<comment></comment>
<projects>
</projects>
17 years, 6 months
JBoss JBPM SVN: r2608 - jbpm3/trunk/modules/core.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-10-24 10:07:20 -0400 (Fri, 24 Oct 2008)
New Revision: 2608
Modified:
jbpm3/trunk/modules/core/pom.xml
Log:
[JBPM-1782] excluding JoinExecutionDbTest on postgresql
Modified: jbpm3/trunk/modules/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/core/pom.xml 2008-10-24 14:04:46 UTC (rev 2607)
+++ jbpm3/trunk/modules/core/pom.xml 2008-10-24 14:07:20 UTC (rev 2608)
@@ -319,6 +319,8 @@
<!-- https://jira.jboss.org/jira/browse/JBPM-1772 -->
<exclude>org/jbpm/jpdl/exe/JoinDbTest.java</exclude>
<exclude>org/jbpm/graph/exe/SubProcessPlusConcurrencyDbTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1782 -->
+ <exclude>org/jbpm/jpdl/exe/JoinExecutionDbTest.java</exclude>
</excludes>
</configuration>
</plugin>
17 years, 6 months
JBoss JBPM SVN: r2607 - in jbpm3/trunk/modules/core: src/test/java/org/jbpm and 1 other directory.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-10-24 10:04:46 -0400 (Fri, 24 Oct 2008)
New Revision: 2607
Removed:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jcr/
Modified:
jbpm3/trunk/modules/core/pom.xml
Log:
[JBPM-1720] removing JcrDbTest
Modified: jbpm3/trunk/modules/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/core/pom.xml 2008-10-24 11:16:13 UTC (rev 2606)
+++ jbpm3/trunk/modules/core/pom.xml 2008-10-24 14:04:46 UTC (rev 2607)
@@ -207,8 +207,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!-- 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>
@@ -242,8 +240,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!-- 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>
@@ -277,8 +273,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!-- 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>
@@ -314,8 +308,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!-- 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>
@@ -352,8 +344,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!-- 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>
17 years, 6 months
JBoss JBPM SVN: r2606 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/db.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-10-24 07:16:13 -0400 (Fri, 24 Oct 2008)
New Revision: 2606
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java
Log:
removed cleaning of the schema in case a db test leaves records. this resulted into problems on mysql
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java 2008-10-24 10:57:06 UTC (rev 2605)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java 2008-10-24 11:16:13 UTC (rev 2606)
@@ -100,7 +100,8 @@
}
if (hasLeftOvers) {
- jbpmSchema.cleanSchema();
+ // TODO: JBPM-1781
+ // jbpmSchema.cleanSchema();
}
}
17 years, 6 months
JBoss JBPM SVN: r2605 - in jbpm3/branches/tdiesler: hudson/hudson-home and 3 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-24 06:57:06 -0400 (Fri, 24 Oct 2008)
New Revision: 2605
Modified:
jbpm3/branches/tdiesler/hudson/hudson-home/command.sh
jbpm3/branches/tdiesler/modules/core/pom.xml
jbpm3/branches/tdiesler/modules/core/scripts/antrun-jbpm-config.xml
jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.mysql.xml
jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.postgresql.xml
jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.sybase.xml
jbpm3/branches/tdiesler/profiles.xml.example
Log:
WIP
Modified: jbpm3/branches/tdiesler/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/branches/tdiesler/hudson/hudson-home/command.sh 2008-10-24 10:47:18 UTC (rev 2604)
+++ jbpm3/branches/tdiesler/hudson/hudson-home/command.sh 2008-10-24 10:57:06 UTC (rev 2605)
@@ -83,7 +83,7 @@
#
# execute tests
#
-MVN_CMD="mvn -o $ENVIRONMENT -DtestFailureIgnore=true test"
+MVN_CMD="mvn -o -fae $ENVIRONMENT test"
echo $MVN_CMD; $MVN_CMD 2>&1 | tee $WORKSPACE/tests.log
cat $WORKSPACE/tests.log | egrep FIXME\|FAILED | sort -u | tee $WORKSPACE/fixme.txt
cat $WORKSPACE/fixme.txt | egrep "\[\S*]" > $WORKSPACE/errata-$CONTAINER.txt
Modified: jbpm3/branches/tdiesler/modules/core/pom.xml
===================================================================
--- jbpm3/branches/tdiesler/modules/core/pom.xml 2008-10-24 10:47:18 UTC (rev 2604)
+++ jbpm3/branches/tdiesler/modules/core/pom.xml 2008-10-24 10:57:06 UTC (rev 2605)
@@ -120,6 +120,12 @@
<!-- Plugins -->
<build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
@@ -159,7 +165,7 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <phase>generate-resources</phase>
+ <phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
Modified: jbpm3/branches/tdiesler/modules/core/scripts/antrun-jbpm-config.xml
===================================================================
--- jbpm3/branches/tdiesler/modules/core/scripts/antrun-jbpm-config.xml 2008-10-24 10:47:18 UTC (rev 2604)
+++ jbpm3/branches/tdiesler/modules/core/scripts/antrun-jbpm-config.xml 2008-10-24 10:57:06 UTC (rev 2605)
@@ -14,7 +14,7 @@
<project default="concat">
<property name="project.build.directory" value="${basedir}/target"/>
- <property name="project.resources.directory" value="${basedir}/src/main/resources"/>
+ <property name="project.resources.directory" value="${basedir}/target/classes"/>
<!--
macrodef: macro-database-cfg
Modified: jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.mysql.xml
===================================================================
--- jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.mysql.xml 2008-10-24 10:47:18 UTC (rev 2604)
+++ jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.mysql.xml 2008-10-24 10:57:06 UTC (rev 2605)
@@ -4,8 +4,8 @@
<!-- JDBC connection properties (begin) -->
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
- <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmtest</property>
- <property name="hibernate.connection.username">jbpmtest</property>
- <property name="hibernate.connection.password"></property>
+ <property name="hibernate.connection.url">${jdbc.mysql.url}</property>
+ <property name="hibernate.connection.username">${jdbc.mysql.username}</property>
+ <property name="hibernate.connection.password">${jdbc.mysql.password}</property>
<property name="hibernate.query.substitutions">true 1, false 0</property>
<!-- JDBC connection properties (end) -->
Modified: jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.postgresql.xml
===================================================================
--- jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.postgresql.xml 2008-10-24 10:47:18 UTC (rev 2604)
+++ jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.postgresql.xml 2008-10-24 10:57:06 UTC (rev 2605)
@@ -4,7 +4,7 @@
<!-- JDBC connection properties (begin) -->
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
- <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/jbpmtest</property>
- <property name="hibernate.connection.username">jbpmtest</property>
- <property name="hibernate.connection.password"></property>
+ <property name="hibernate.connection.url">${jdbc.postgresql.url}</property>
+ <property name="hibernate.connection.username">${jdbc.postgresql.username}</property>
+ <property name="hibernate.connection.password">${jdbc.postgresql.password}</property>
<!-- JDBC connection properties (end) -->
Modified: jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.sybase.xml
===================================================================
--- jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.sybase.xml 2008-10-24 10:47:18 UTC (rev 2604)
+++ jbpm3/branches/tdiesler/modules/core/src/main/resources/hibernate.properties.sybase.xml 2008-10-24 10:57:06 UTC (rev 2605)
@@ -11,8 +11,8 @@
<!-- JDBC connection properties (begin) -->
<property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
- <property name="hibernate.connection.url">jdbc:jtds:sybase://dev01.qa.atl.jboss.com:4100/jbpmteam</property>
- <property name="hibernate.connection.username">jbpmteam</property>
- <property name="hibernate.connection.password">jbpmteam</property>
+ <property name="hibernate.connection.url">${jdbc.sybase.url}</property>
+ <property name="hibernate.connection.username">${jdbc.sybase.username}</property>
+ <property name="hibernate.connection.password">${jdbc.sybase.password}</property>
<!-- JDBC connection properties (end) -->
Modified: jbpm3/branches/tdiesler/profiles.xml.example
===================================================================
--- jbpm3/branches/tdiesler/profiles.xml.example 2008-10-24 10:47:18 UTC (rev 2604)
+++ jbpm3/branches/tdiesler/profiles.xml.example 2008-10-24 10:57:06 UTC (rev 2605)
@@ -16,6 +16,18 @@
<jboss422.home>/home/tdiesler/svn/jbossas/tags/JBoss_4_2_2_GA/build/output/jboss-4.2.2.GA</jboss422.home>
<jboss423.home>/home/tdiesler/svn/jbossas/tags/JBoss_4_2_3_GA/build/output/jboss-4.2.3.GA</jboss423.home>
<jboss500.home>/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_CR2/build/output/jboss-5.0.0.CR2</jboss500.home>
+
+ <jdbc.mysql.url>jdbc:mysql://localhost:3306/jbpmtest</jdbc.mysql.url>
+ <jdbc.mysql.username>jbpmtest</jdbc.mysql.username>
+ <jdbc.mysql.password></jdbc.mysql.password>
+
+ <jdbc.postgresql.url>jdbc:postgresql://localhost:5432/jbpmtest</jdbc.postgresql.url>
+ <jdbc.postgresql.username>jbpmtest</jdbc.postgresql.username>
+ <jdbc.postgresql.password></jdbc.postgresql.password>
+
+ <jdbc.sybase.url>jdbc:jtds:sybase://dev01.qa.atl.jboss.com:4100/jbpmteam</jdbc.sybase.url>
+ <jdbc.sybase.username>jbpmteam</jdbc.sybase.username>
+ <jdbc.sybase.password>jbpmteam</jdbc.sybase.password>
</properties>
</profile>
17 years, 6 months
JBoss JBPM SVN: r2604 - jbpm3/branches.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-24 06:47:18 -0400 (Fri, 24 Oct 2008)
New Revision: 2604
Added:
jbpm3/branches/tdiesler/
Log:
Recreate userbranch
Copied: jbpm3/branches/tdiesler (from rev 2603, jbpm3/trunk)
17 years, 6 months
JBoss JBPM SVN: r2603 - jbpm3/branches.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-24 06:46:24 -0400 (Fri, 24 Oct 2008)
New Revision: 2603
Removed:
jbpm3/branches/tdiesler/
Log:
Recreate userbranch
17 years, 6 months
JBoss JBPM SVN: r2602 - in jbpm3/trunk: modules/distribution/src/main/resources/database and 2 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-10-24 03:31:58 -0400 (Fri, 24 Oct 2008)
New Revision: 2602
Modified:
jbpm3/trunk/modules/distribution/src/main/resources/database/jbpm-postgresql-ds.xml
jbpm3/trunk/modules/enterprise/jar/pom.xml
jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java
jbpm3/trunk/pom.xml
Log:
[JBPM-1708] support for test exclusion with property datasource.xa
configured and tested postgresql xa datasource
Modified: jbpm3/trunk/modules/distribution/src/main/resources/database/jbpm-postgresql-ds.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/database/jbpm-postgresql-ds.xml 2008-10-23 13:57:46 UTC (rev 2601)
+++ jbpm3/trunk/modules/distribution/src/main/resources/database/jbpm-postgresql-ds.xml 2008-10-24 07:31:58 UTC (rev 2602)
@@ -2,28 +2,22 @@
<datasources>
- <local-tx-datasource>
- <jndi-name>JbpmDS</jndi-name>
- <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}jbpmDB</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
- <min-pool-size>1</min-pool-size>
- <max-pool-size>5</max-pool-size>
- <idle-timeout-minutes>0</idle-timeout-minutes>
- <track-statements/>
- <!--
- <security-domain>HsqlDbRealm</security-domain>
- -->
- <prepared-statement-cache-size>32</prepared-statement-cache-size>
- <metadata><type-mapping>Hypersonic SQL</type-mapping></metadata>
- <depends>jboss:service=Hypersonic,database=jbpmDB</depends>
- </local-tx-datasource>
+ <xa-datasource>
+ <jndi-name>JbpmDS</jndi-name>
+ <track-connection-by-tx />
- <mbean code="org.jboss.jdbc.HypersonicDatabase"
- name="jboss:service=Hypersonic,database=jbpmDB">
- <attribute name="Database">jbpmDB</attribute>
- <attribute name="InProcessMode">true</attribute>
- </mbean>
+ <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
+ <xa-datasource-property name="ServerName">localhost</xa-datasource-property>
+ <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
+ <xa-datasource-property name="DatabaseName">jbpmtest</xa-datasource-property>
+ <xa-datasource-property name="User">jbpmtest</xa-datasource-property>
+ <xa-datasource-property name="Password"></xa-datasource-property>
+
+ <!-- corresponding type-mapping in conf/standardjbosscmp-jdbc.xml -->
+ <metadata>
+ <type-mapping>PostgreSQL 8.0</type-mapping>
+ </metadata>
+ </xa-datasource>
+
</datasources>
Modified: jbpm3/trunk/modules/enterprise/jar/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-10-23 13:57:46 UTC (rev 2601)
+++ jbpm3/trunk/modules/enterprise/jar/pom.xml 2008-10-24 07:31:58 UTC (rev 2602)
@@ -180,9 +180,9 @@
<!-- Please only remove excludes, when the tests are working -->
<excludes>
<!-- https://jira.jboss.org/jira/browse/JBPM-1708 -->
- <exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude>
+ <!-- exclude>org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java</exclude -->
<!-- https://jira.jboss.org/jira/browse/JBPM-1709 -->
- <exclude>org/jbpm/msg/jms/JmsMessageTest.java</exclude>
+ <!-- exclude>org/jbpm/msg/jms/JmsMessageTest.java</exclude -->
</excludes>
</configuration>
</plugin>
@@ -234,6 +234,10 @@
<name>log4j.output.dir</name>
<value>${basedir}/target</value>
</property>
+ <property>
+ <name>datasource.xa</name>
+ <value>${datasource.xa}</value>
+ </property>
</systemProperties>
</configuration>
</plugin>
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-10-23 13:57:46 UTC (rev 2601)
+++ jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java 2008-10-24 07:31:58 UTC (rev 2602)
@@ -21,12 +21,14 @@
*/
package org.jbpm.scheduler.ejbtimer;
+import java.rmi.RemoteException;
import java.util.Collections;
import javax.naming.Context;
import javax.naming.InitialContext;
import junit.framework.Test;
+import junit.framework.TestSuite;
import org.apache.cactus.ServletTestCase;
import org.apache.commons.logging.Log;
@@ -49,8 +51,7 @@
*
* @author Alejandro Guizar
*/
-public class EjbSchedulerTest extends ServletTestCase
-{
+public class EjbSchedulerTest extends ServletTestCase {
private LocalCommandService commandService;
@@ -58,22 +59,19 @@
private static final Log log = LogFactory.getLog(EjbSchedulerTest.class);
- public static Test suite() throws Exception
- {
- return new IntegrationTestSetup(EjbSchedulerTest.class, "enterprise-test.war");
+ public static Test suite() throws Exception {
+ return Boolean.getBoolean("datasource.xa") ?
+ new IntegrationTestSetup(EjbSchedulerTest.class, "enterprise-test.war") :
+ new TestSuite();
}
- protected void setUp() throws Exception
- {
- if (commandServiceHome == null)
- {
+ protected void setUp() throws Exception {
+ if (commandServiceHome == null) {
Context initialContext = new InitialContext();
- try
- {
- commandServiceHome = (LocalCommandServiceHome)initialContext.lookup("java:comp/env/ejb/CommandServiceBean");
+ try {
+ commandServiceHome = (LocalCommandServiceHome) initialContext.lookup("java:comp/env/ejb/CommandServiceBean");
}
- finally
- {
+ finally {
initialContext.close();
}
}
@@ -81,42 +79,65 @@
log.info("### " + getName() + " started ###");
}
- protected void tearDown() throws Exception
- {
+ protected void tearDown() throws Exception {
log.info("### " + getName() + " done ###");
commandService = null;
}
- public void testScheduleFuture() throws Exception
- {
- deployProcess("<process-definition name='future'>" + " <event type='process-end'>" + " <action expression='#{eventCallback.processEnd}'/>" + " </event>"
- + " <start-state name='start'>" + " <transition to='a' />" + " </start-state>" + " <state name='a'>"
- + " <timer duedate='1 second' transition='timeout' />" + " <transition name='timeout' to='end' />" + " </state>" + " <end-state name='end' />"
+ public void testScheduleFuture() throws Exception {
+ deployProcess("<process-definition name='future'>"
+ + " <event type='process-end'>"
+ + " <action expression='#{eventCallback.processEnd}'/>"
+ + " </event>"
+ + " <start-state name='start'>"
+ + " <transition to='a' />"
+ + " </start-state>"
+ + " <state name='a'>"
+ + " <timer duedate='1 second' transition='timeout' />"
+ + " <transition name='timeout' to='end' />"
+ + " </state>"
+ + " <end-state name='end' />"
+ "</process-definition>");
long processId = launchProcess("future").getId();
EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
assertTrue(isProcessFinished(processId));
}
- public void testSchedulePast() throws Exception
- {
- deployProcess("<process-definition name='past'>" + " <event type='process-end'>" + " <action expression='#{eventCallback.processEnd}'/>" + " </event>"
- + " <start-state name='start'>" + " <transition to='a' />" + " </start-state>" + " <state name='a'>"
- + " <timer duedate='-1 second' transition='timeout' />" + " <transition name='timeout' to='end' />" + " </state>" + " <end-state name='end' />"
+ public void testSchedulePast() throws Exception {
+ deployProcess("<process-definition name='past'>"
+ + " <event type='process-end'>"
+ + " <action expression='#{eventCallback.processEnd}'/>"
+ + " </event>"
+ + " <start-state name='start'>"
+ + " <transition to='a' />"
+ + " </start-state>"
+ + " <state name='a'>"
+ + " <timer duedate='-1 second' transition='timeout' />"
+ + " <transition name='timeout' to='end' />"
+ + " </state>"
+ + " <end-state name='end' />"
+ "</process-definition>");
long processId = launchProcess("past").getId();
EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
assertTrue(isProcessFinished(processId));
}
- public void testScheduleRepeat() throws Exception
- {
- deployProcess("<process-definition name='repeat'>" + " <event type='timer'>" + " <action expression='#{eventCallback.timer}'/>" + " </event>"
- + " <start-state name='start'>" + " <transition to='a' />" + " </start-state>" + " <state name='a'>"
- + " <timer duedate='1 second' repeat='1 second' />" + " <transition to='end' />" + " </state>" + " <end-state name='end' />" + "</process-definition>");
+ public void testScheduleRepeat() throws Exception {
+ deployProcess("<process-definition name='repeat'>"
+ + " <event type='timer'>"
+ + " <action expression='#{eventCallback.timer}'/>"
+ + " </event>"
+ + " <start-state name='start'>"
+ + " <transition to='a' />"
+ + " </start-state>"
+ + " <state name='a'>"
+ + " <timer duedate='1 second' repeat='1 second' />"
+ + " <transition to='end' />"
+ + " </state>"
+ + " <end-state name='end' />"
+ + "</process-definition>");
long processId = launchProcess("repeat").getId();
- for (int i = 0; i < 3; i++)
- {
+ for (int i = 0; i < 3; i++) {
EventCallback.waitForEvent(Event.EVENTTYPE_TIMER);
assertEquals("a", getProcessState(processId));
}
@@ -124,11 +145,20 @@
assertTrue(isProcessFinished(processId));
}
- public void testCancel() throws Exception
- {
- deployProcess("<process-definition name='cancel'>" + " <event type='timer'>" + " <action expression='#{eventCallback.timer}'/>" + " </event>"
- + " <start-state name='start'>" + " <transition to='a' />" + " </start-state>" + " <state name='a'>"
- + " <timer duedate='1 second' repeat='1 second' />" + " <transition to='end' />" + " </state>" + " <end-state name='end' />" + "</process-definition>");
+ public void testCancel() throws Exception {
+ deployProcess("<process-definition name='cancel'>"
+ + " <event type='timer'>"
+ + " <action expression='#{eventCallback.timer}'/>"
+ + " </event>"
+ + " <start-state name='start'>"
+ + " <transition to='a' />"
+ + " </start-state>"
+ + " <state name='a'>"
+ + " <timer duedate='1 second' repeat='1 second' />"
+ + " <transition to='end' />"
+ + " </state>"
+ + " <end-state name='end' />"
+ + "</process-definition>");
ProcessInstance process = launchProcess("cancel");
long processId = process.getId();
// first expiration
@@ -144,20 +174,42 @@
assertTrue(isProcessFinished(processId));
}
- public void testScheduleSequence() throws Exception
- {
- deployProcess("<process-definition name='sequence'>" + " <event type='process-end'>" + " <action expression='#{eventCallback.processEnd}'/>" + " </event>"
- + " <event type='timer'>" + " <action expression='#{eventCallback.timer}'/>" + " </event>" + " <start-state>" + " <transition to='a' />"
- + " </start-state>" + " <state name='a'>" + " <timer duedate='500 milliseconds' transition='timeout' />" + " <transition name='timeout' to='b' />"
- + " </state>" + " <state name='b'>" + " <timer duedate='500 milliseconds' transition='timeout' />" + " <transition name='timeout' to='c' />"
- + " </state>" + " <state name='c'>" + " <timer duedate='500 milliseconds' transition='timeout' />" + " <transition name='timeout' to='d' />"
- + " </state>" + " <state name='d'>" + " <timer duedate='500 milliseconds' transition='timeout' />" + " <transition name='timeout' to='e' />"
- + " </state>" + " <state name='e'>" + " <timer duedate='500 milliseconds' transition='timeout' />" + " <transition name='timeout' to='end' />"
- + " </state>" + " <end-state name='end' />" + "</process-definition>");
+ public void testScheduleSequence() throws Exception {
+ deployProcess("<process-definition name='sequence'>"
+ + " <event type='process-end'>"
+ + " <action expression='#{eventCallback.processEnd}'/>"
+ + " </event>"
+ + " <event type='timer'>"
+ + " <action expression='#{eventCallback.timer}'/>"
+ + " </event>"
+ + " <start-state>"
+ + " <transition to='a' />"
+ + " </start-state>"
+ + " <state name='a'>"
+ + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <transition name='timeout' to='b' />"
+ + " </state>"
+ + " <state name='b'>"
+ + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <transition name='timeout' to='c' />"
+ + " </state>"
+ + " <state name='c'>"
+ + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <transition name='timeout' to='d' />"
+ + " </state>"
+ + " <state name='d'>"
+ + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <transition name='timeout' to='e' />"
+ + " </state>"
+ + " <state name='e'>"
+ + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <transition name='timeout' to='end' />"
+ + " </state>"
+ + " <end-state name='end' />"
+ + "</process-definition>");
long processId = launchProcess("sequence").getId();
char state = 'b';
- for (int i = 0; i < 4; i++)
- {
+ for (int i = 0; i < 4; i++) {
EventCallback.waitForEvent(Event.EVENTTYPE_TIMER);
assertEquals(Character.toString(state++), getProcessState(processId));
}
@@ -165,84 +217,103 @@
assertTrue(isProcessFinished(processId));
}
- public void testScheduleFork() throws InterruptedException
- {
- 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>" + " <state name='a'>" + " <timer duedate='0.25 seconds' transition='timeout' />" + " <transition name='timeout' to='j' />" + " </state>"
- + " <state name='b'>" + " <timer duedate='0.5 seconds' transition='timeout' />" + " <transition name='timeout' to='j' />" + " </state>"
- + " <state name='c'>" + " <timer duedate='0.75 seconds' transition='timeout' />" + " <transition name='timeout' to='j' />" + " </state>"
- + " <state name='d'>" + " <timer duedate='1 second' transition='timeout' />" + " <transition name='timeout' to='j' />" + " </state>"
- + " <state name='e'>" + " <timer duedate='1.25 second' transition='timeout' />" + " <transition name='timeout' to='j' />" + " </state>"
- + " <join name='j'>" + " <transition to='end' />" + " </join>" + " <end-state name='end' />" + "</process-definition>");
+ public void testScheduleFork() throws Exception {
+ 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>"
+ + " <state name='a'>"
+ + " <timer duedate='0.25 seconds' transition='timeout' />"
+ + " <transition name='timeout' to='j' />"
+ + " </state>"
+ + " <state name='b'>"
+ + " <timer duedate='0.5 seconds' transition='timeout' />"
+ + " <transition name='timeout' to='j' />"
+ + " </state>"
+ + " <state name='c'>"
+ + " <timer duedate='0.75 seconds' transition='timeout' />"
+ + " <transition name='timeout' to='j' />"
+ + " </state>"
+ + " <state name='d'>"
+ + " <timer duedate='1 second' transition='timeout' />"
+ + " <transition name='timeout' to='j' />"
+ + " </state>"
+ + " <state name='e'>"
+ + " <timer duedate='1.25 second' transition='timeout' />"
+ + " <transition name='timeout' to='j' />"
+ + " </state>"
+ + " <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));
}
- private ProcessDefinition deployProcess(String xml)
- {
- return (ProcessDefinition)commandService.execute(new DeployProcessCommand(xml));
+ private ProcessDefinition deployProcess(String xml) throws RemoteException {
+ return (ProcessDefinition) commandService.execute(new DeployProcessCommand(xml));
}
- private ProcessInstance launchProcess(String processName)
- {
+ private ProcessInstance launchProcess(String processName) throws RemoteException {
StartProcessInstanceCommand command = new StartProcessInstanceCommand();
command.setProcessName(processName);
command.setVariables(Collections.singletonMap("eventCallback", new EventCallback()));
- return (ProcessInstance)commandService.execute(command);
+ return (ProcessInstance) commandService.execute(command);
}
- private void signalProcess(final long processId)
- {
- commandService.execute(new Command()
- {
+ private void signalProcess(final long processId) throws RemoteException {
+ commandService.execute(new Command() {
+
private static final long serialVersionUID = 1L;
- public Object execute(JbpmContext jbpmContext) throws Exception
- {
+ public Object execute(JbpmContext jbpmContext) throws Exception {
jbpmContext.loadProcessInstanceForUpdate(processId).signal();
return null;
}
});
}
- private String getProcessState(final long processId)
- {
- return (String)commandService.execute(new Command()
- {
+ private String getProcessState(final long processId) throws RemoteException {
+ return (String) commandService.execute(new Command() {
+
private static final long serialVersionUID = 1L;
- public Object execute(JbpmContext jbpmContext) throws Exception
- {
+ public Object execute(JbpmContext jbpmContext) throws Exception {
return jbpmContext.loadProcessInstance(processId).getRootToken().getNode().getName();
}
});
}
- private boolean isProcessFinished(final long processId)
- {
- Boolean isFinished = (Boolean)commandService.execute(new Command()
- {
+ private boolean isProcessFinished(final long processId) throws RemoteException {
+ Boolean isFinished = (Boolean) commandService.execute(new Command() {
+
private static final long serialVersionUID = 1L;
- public Object execute(JbpmContext jbpmContext) throws Exception
- {
+ public Object execute(JbpmContext jbpmContext) throws Exception {
return jbpmContext.loadProcessInstance(processId).hasEnded();
}
});
return isFinished.booleanValue();
}
- private void cancelTimer(final String timerName, final long tokenId)
- {
- commandService.execute(new Command()
- {
+ private void cancelTimer(final String timerName, final long tokenId) throws RemoteException {
+ commandService.execute(new Command() {
+
private static final long serialVersionUID = 1L;
- public Object execute(JbpmContext jbpmContext) throws Exception
- {
+ public Object execute(JbpmContext jbpmContext) throws Exception {
Token token = jbpmContext.loadToken(tokenId);
jbpmContext.getServices().getSchedulerService().deleteTimersByName(timerName, token);
return null;
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-10-23 13:57:46 UTC (rev 2601)
+++ jbpm3/trunk/pom.xml 2008-10-24 07:31:58 UTC (rev 2602)
@@ -519,6 +519,9 @@
<value>postgresql</value>
</property>
</activation>
+ <properties>
+ <datasource.xa>true</datasource.xa>
+ </properties>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
@@ -541,6 +544,9 @@
<value>sybase</value>
</property>
</activation>
+ <properties>
+ <datasource.xa>true</datasource.xa>
+ </properties>
<dependencies>
<dependency>
<groupId>com.sybase</groupId>
17 years, 6 months
JBoss JBPM SVN: r2601 - jbpm3/trunk/modules/core/src/test/java/org/jbpm/jpdl/par.
by do-not-reply@jboss.org
Author: camunda
Date: 2008-10-23 09:57:46 -0400 (Thu, 23 Oct 2008)
New Revision: 2601
Modified:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jpdl/par/ProcessArchiveDeploymentDbTest.java
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jpdl/par/ProcessClassLoaderTest.java
Log:
added class loading test cases and TODO
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jpdl/par/ProcessArchiveDeploymentDbTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jpdl/par/ProcessArchiveDeploymentDbTest.java 2008-10-23 13:39:39 UTC (rev 2600)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jpdl/par/ProcessArchiveDeploymentDbTest.java 2008-10-23 13:57:46 UTC (rev 2601)
@@ -299,7 +299,13 @@
assertEquals(ProcessClassLoader.class, resourceActionInstance.getClass().getClassLoader().getClass());
resourceActionInstance = null;
}
+
+ // TODO: do the same thing when using the context class loader
+ // and check, that the hierarchy is correct ProcessClassLoader -> ContextClassLoader
+ // and not ProcessClassLoader -> ProcessClassLoader -> ContextClassLoader
+ // assertEquals(Thread.currentThread().getContextClassLoader(), resourceActionInstance.getClass().getClassLoader().getParent());
+
private static void addEntry(ZipOutputStream zipOutputStream, String entryName, String resource) throws IOException
{
InputStream inputStream = ClassLoaderUtil.getStream(resource);
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jpdl/par/ProcessClassLoaderTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jpdl/par/ProcessClassLoaderTest.java 2008-10-23 13:39:39 UTC (rev 2600)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jpdl/par/ProcessClassLoaderTest.java 2008-10-23 13:57:46 UTC (rev 2601)
@@ -7,9 +7,17 @@
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.instantiation.ConfigurableClassloadersTest;
import org.jbpm.instantiation.ProcessClassLoader;
-
+/**
+ * Test case for ProcessClassLoader hierarchy and setting the ContextClassLoader correctly.
+ *
+ * Relates to {@link ConfigurableClassloadersTest}.
+ *
+ * @author Tom Baeyens, bernd.ruecker(a)camunda.com
+ *
+ */
public class ProcessClassLoaderTest extends AbstractJbpmTestCase {
public static class TestContextClassLoader extends ClassLoader {
@@ -20,23 +28,13 @@
if ("TestContextClassLoader-knows-where-to-find-ContextLoadedAction".equals(name)) {
return getParent().loadClass(ContextLoadedAction.class.getName());
}
+ else if ("TestContextClassLoader-knows-where-to-find-ContextLoadedExceptionAction".equals(name)) {
+ return getParent().loadClass(ContextLoadedExceptionAction.class.getName());
+ }
return null;
}
}
- public static class ContextLoadedAction implements ActionHandler {
- public void execute(ExecutionContext executionContext) throws Exception {
- ClassLoader processClassLoader = Thread.currentThread().getContextClassLoader();
- assertSame(ProcessClassLoader.class, processClassLoader.getClass());
- ClassLoader testContextClassLoader = processClassLoader.getParent();
- assertSame(TestContextClassLoader.class, testContextClassLoader.getClass());
-
- assertSame(originalClassLoader, testContextClassLoader.getParent());
-
- contextLoadedActionInvocations++;
- }
- }
-
static int contextLoadedActionInvocations = 0;
static ClassLoader originalClassLoader = null;
@@ -46,7 +44,28 @@
originalClassLoader = Thread.currentThread().getContextClassLoader();
}
+ /**
+ * test using the context class loader for jbpm. Setting an own context class loader,
+ * so we know if it was used.
+ *
+ * Classloading hierarchy should be
+ * ProcessClassloader -> TestContextClassLoader -> Thread.currentContextClassLoader
+ */
+ public static class ContextLoadedAction implements ActionHandler {
+ public void execute(ExecutionContext executionContext) throws Exception {
+ ClassLoader processClassLoader = Thread.currentThread().getContextClassLoader();
+ assertSame(ProcessClassLoader.class, processClassLoader.getClass());
+
+ ClassLoader testContextClassLoader = processClassLoader.getParent();
+ assertSame(TestContextClassLoader.class, testContextClassLoader.getClass());
+
+ assertSame(originalClassLoader, testContextClassLoader.getParent());
+
+ contextLoadedActionInvocations++;
+ }
+ }
public void testContextClassLoader() {
+
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
"<jbpm-configuration>" +
" <string name='jbpm.classLoader' value='context' />" +
@@ -84,15 +103,119 @@
jbpmContext.close();
}
}
+
+ /**
+ * a second test use the default configuration and verify the
+ * classloader hierarchy inside of the action. The action class should
+ * be referenced properly. No test context classloader should be installed.
+ * The hierarchy in the action should be:
+ * ProcessClassLoader ---> ClassLoader.getSystemClassLoader()
+ */
+ public static class DefaultLoadedAction implements ActionHandler {
+ public void execute(ExecutionContext executionContext) throws Exception {
+ ClassLoader processClassLoader = Thread.currentThread()
+ .getContextClassLoader();
+ assertSame(ProcessClassLoader.class, processClassLoader.getClass());
- // TODO a second test should use the default configuration and verify the
- // classloader hierarchy inside of the action. The action class should
- // be referenced properly. No test context classloader should be installed.
- // The hierarchy in the action should be:
- // ProcessClassLoader ---> ClassLoader.getSystemClassLoader()
-
- // TODO a third test should set the testcontextClassLoader in the test and then
- // let the action throw an exception. Then it should be verified that the
- // original classloader is still restored correctly. Easiest is to start
- // from a copy of the testContextClassLoader
+ assertSame(originalClassLoader, processClassLoader.getParent());
+ assertSame(ClassLoader.getSystemClassLoader(), processClassLoader.getParent());
+
+ contextLoadedActionInvocations++;
+ }
+ }
+ public void testDefaultClassLoader() {
+ JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
+ "<jbpm-configuration>" +
+ " <string name='jbpm.classLoader' value='jbpm' />" +
+ "</jbpm-configuration>"
+ );
+
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ try {
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
+ "<process-definition>" +
+ " <start-state name='start'>" +
+ " <transition to='state'>" +
+ " <action class='org.jbpm.jpdl.par.ProcessClassLoaderTest$DefaultLoadedAction' />" +
+ " </transition>" +
+ " </start-state>" +
+ " <state name='state'>" +
+ " <transition to='end'/>" +
+ " </state>" +
+ " <end-state name='end'/>" +
+ "</process-definition>"
+ );
+
+ // create the process instance
+ ProcessInstance processInstance = new ProcessInstance(processDefinition);
+ processInstance.signal();
+
+ assertEquals(1, contextLoadedActionInvocations);
+ } finally {
+ Thread.currentThread().setContextClassLoader(originalClassLoader);
+ jbpmContext.close();
+ }
+ }
+
+ /**
+ * a third test should set the testcontextClassLoader in the test and then
+ * let the action throw an exception. Then it should be verified that the
+ * original classloader is still restored correctly. Easiest is to start
+ * from a copy of the testContextClassLoader
+ */
+ public static class ContextLoadedExceptionAction implements ActionHandler {
+ public void execute(ExecutionContext executionContext) throws Exception {
+ ClassLoader processClassLoader = Thread.currentThread().getContextClassLoader();
+ assertSame(ProcessClassLoader.class, processClassLoader.getClass());
+
+ ClassLoader testContextClassLoader = processClassLoader.getParent();
+ assertSame(TestContextClassLoader.class, testContextClassLoader.getClass());
+
+ assertSame(originalClassLoader, testContextClassLoader.getParent());
+
+ contextLoadedActionInvocations++;
+
+ throw new Exception("simulate exception");
+ }
+ }
+ public void testContextClassLoaderException() {
+ JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
+ "<jbpm-configuration>" +
+ " <string name='jbpm.classLoader' value='context' />" +
+ "</jbpm-configuration>"
+ );
+
+ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+ TestContextClassLoader testContextClassLoader = new TestContextClassLoader(originalClassLoader);
+ try {
+ Thread.currentThread().setContextClassLoader(testContextClassLoader);
+
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
+ "<process-definition>" +
+ " <start-state name='start'>" +
+ " <transition to='state'>" +
+ " <action class='TestContextClassLoader-knows-where-to-find-ContextLoadedExceptionAction' />" +
+ " </transition>" +
+ " </start-state>" +
+ " <state name='state'>" +
+ " <transition to='end'/>" +
+ " </state>" +
+ " <end-state name='end'/>" +
+ "</process-definition>"
+ );
+
+ // create the process instance
+ ProcessInstance processInstance = new ProcessInstance(processDefinition);
+ processInstance.signal();
+
+ } catch(Exception ex) {
+ assertEquals(1, contextLoadedActionInvocations);
+ assertEquals("simulate exception", ex.getMessage());
+ assertSame(testContextClassLoader, Thread.currentThread().getContextClassLoader());
+
+ } finally {
+ Thread.currentThread().setContextClassLoader(originalClassLoader);
+ jbpmContext.close();
+ }
+ }
}
17 years, 6 months