JBoss JBPM SVN: r3940 - in jbpm3/branches/jbpm-3.2.5.SP: modules/core and 8 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-02-19 04:24:17 -0500 (Thu, 19 Feb 2009)
New Revision: 3940
Modified:
jbpm3/branches/jbpm-3.2.5.SP/modules/core/pom.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/db/pom.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/distribution/pom.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/enterprise/pom.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/examples/pom.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/identity/pom.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/integration/pom.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/simulation/pom.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/userguide/pom.xml
jbpm3/branches/jbpm-3.2.5.SP/pom.xml
Log:
version=3.2.5.SP2
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/pom.xml 2009-02-19 09:10:48 UTC (rev 3939)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/pom.xml 2009-02-19 09:24:17 UTC (rev 3940)
@@ -23,7 +23,7 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
- <version>3.2.5.SP1</version>
+ <version>3.2.5.SP2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/db/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/db/pom.xml 2009-02-19 09:10:48 UTC (rev 3939)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/db/pom.xml 2009-02-19 09:24:17 UTC (rev 3940)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
- <version>3.2.5.SP1</version>
+ <version>3.2.5.SP2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/distribution/pom.xml 2009-02-19 09:10:48 UTC (rev 3939)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/distribution/pom.xml 2009-02-19 09:24:17 UTC (rev 3940)
@@ -21,7 +21,7 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
- <version>3.2.5.SP1</version>
+ <version>3.2.5.SP2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/enterprise/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/enterprise/pom.xml 2009-02-19 09:10:48 UTC (rev 3939)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/enterprise/pom.xml 2009-02-19 09:24:17 UTC (rev 3940)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
- <version>3.2.5.SP1</version>
+ <version>3.2.5.SP2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/examples/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/examples/pom.xml 2009-02-19 09:10:48 UTC (rev 3939)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/examples/pom.xml 2009-02-19 09:24:17 UTC (rev 3940)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
- <version>3.2.5.SP1</version>
+ <version>3.2.5.SP2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/identity/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/identity/pom.xml 2009-02-19 09:10:48 UTC (rev 3939)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/identity/pom.xml 2009-02-19 09:24:17 UTC (rev 3940)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
- <version>3.2.5.SP1</version>
+ <version>3.2.5.SP2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/integration/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/integration/pom.xml 2009-02-19 09:10:48 UTC (rev 3939)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/integration/pom.xml 2009-02-19 09:24:17 UTC (rev 3940)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
- <version>3.2.5.SP1</version>
+ <version>3.2.5.SP2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/simulation/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/simulation/pom.xml 2009-02-19 09:10:48 UTC (rev 3939)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/simulation/pom.xml 2009-02-19 09:24:17 UTC (rev 3940)
@@ -21,7 +21,7 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
- <version>3.2.5.SP1</version>
+ <version>3.2.5.SP2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/userguide/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/userguide/pom.xml 2009-02-19 09:10:48 UTC (rev 3939)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/userguide/pom.xml 2009-02-19 09:24:17 UTC (rev 3940)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
- <version>3.2.5.SP1</version>
+ <version>3.2.5.SP2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: jbpm3/branches/jbpm-3.2.5.SP/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/pom.xml 2009-02-19 09:10:48 UTC (rev 3939)
+++ jbpm3/branches/jbpm-3.2.5.SP/pom.xml 2009-02-19 09:24:17 UTC (rev 3940)
@@ -16,7 +16,7 @@
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
<packaging>pom</packaging>
- <version>3.2.5.SP1</version>
+ <version>3.2.5.SP2</version>
<!-- Parent -->
<parent>
17 years, 2 months
JBoss JBPM SVN: r3939 - jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-02-19 04:10:48 -0500 (Thu, 19 Feb 2009)
New Revision: 3939
Added:
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/AsyncCallTest.java
Log:
[JBPM-2043] Add jBPM performance test coverage
Copied: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/AsyncCallTest.java (from rev 3930, jbpm3/trunk/modules/core/src/test/java/org/jbpm/perf/AsyncCallTest.java)
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/AsyncCallTest.java (rev 0)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/AsyncCallTest.java 2009-02-19 09:10:48 UTC (rev 3939)
@@ -0,0 +1,111 @@
+/*
+ * 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.perf;
+
+// $Id$
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jbpm.command.CommandService;
+import org.jbpm.command.StartProcessInstanceCommand;
+import org.jbpm.command.impl.CommandServiceImpl;
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.ActionHandler;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * This tests creates 10000 process instances. Every instance has an async call
+ * to the test class. See JIRA bugs SOA-1175 and JBPM-2043.
+ *
+ * @author mvecera(a)redhat.com
+ * @author pmacik(a)redhat.com
+ * @author thomas.diesler(a)jboss.com
+ * @since 18-Feb-2009
+ */
+public class AsyncCallTest extends AbstractDbTestCase
+{
+ private static final Log log = LogFactory.getLog(AsyncCallTest.class);
+
+ private CommandService commandService = new CommandServiceImpl(getJbpmConfiguration());
+ private static final int INSTANCES = 1000;
+ private static int count;
+
+ ProcessDefinition processDefinition;
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+
+ processDefinition = ProcessDefinition.parseXmlString(
+ "<process-definition xmlns='urn:jbpm.org:jpdl-3.1' name='processDefinition1'>" +
+ " <start-state name='start'>" +
+ " <transition name='to_state' to='end'>" +
+ " <action class='" + PerfActionHandler.class.getName() + "'/>" +
+ " </transition>" +
+ " </start-state>" +
+ " <end-state name='end'/>" +
+ "</process-definition>");
+
+ saveAndReload(processDefinition);
+ }
+
+ public void tearDown() throws Exception
+ {
+ beginSessionTransaction();
+ jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition.getId());
+ super.tearDown();
+ }
+
+ public void testAsyncCall()
+ {
+ long start = System.currentTimeMillis();
+
+ commitAndCloseSession();
+ startJobExecutor();
+
+ for (count = 0; count < INSTANCES; count++)
+ {
+ beginSessionTransaction();
+ StartProcessInstanceCommand startCommand = new StartProcessInstanceCommand();
+ startCommand.setProcessId(processDefinition.getId());
+ startCommand.setProcessName("processDefinition1");
+ ProcessInstance pi = (ProcessInstance)commandService.execute(startCommand);
+ commitAndCloseSession();
+ }
+
+ stopJobExecutor();
+
+ long stop = System.currentTimeMillis();
+ System.out.println("=== Test finished processing " + INSTANCES + " instances in " + (stop - start) + "ms ===");
+ System.out.println("=== This is " + Math.round(1000 * INSTANCES / (stop - start)) + " instances per second ===");
+ }
+
+ public static class PerfActionHandler implements ActionHandler
+ {
+ public void execute(ExecutionContext executionContext) throws Exception
+ {
+ //System.out.println(count);
+ }
+ }
+}
17 years, 2 months
JBoss JBPM SVN: r3938 - in jbpm4/trunk/modules: enterprise and 5 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-19 04:04:33 -0500 (Thu, 19 Feb 2009)
New Revision: 3938
Added:
jbpm4/trunk/modules/examples/scripts/
jbpm4/trunk/modules/examples/scripts/assembly-config.xml
Modified:
jbpm4/trunk/modules/db/jbpm4-db.iml
jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml
jbpm4/trunk/modules/examples/jbpm4-examples.iml
jbpm4/trunk/modules/examples/pom.xml
jbpm4/trunk/modules/jpdl/scripts/assembly-config.xml
jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml
jbpm4/trunk/modules/test-db/jbpm4-test-db.iml
Log:
Create and populate example database (hsql) and sjip it as part of the example configuration
Modified: jbpm4/trunk/modules/db/jbpm4-db.iml
===================================================================
--- jbpm4/trunk/modules/db/jbpm4-db.iml 2009-02-19 09:03:15 UTC (rev 3937)
+++ jbpm4/trunk/modules/db/jbpm4-db.iml 2009-02-19 09:04:33 UTC (rev 3938)
@@ -11,6 +11,7 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="toplevel" />
<orderEntry type="module" module-name="jpdl" />
+ <orderEntry type="module" module-name="pvm" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
Modified: jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml
===================================================================
--- jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml 2009-02-19 09:03:15 UTC (rev 3937)
+++ jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml 2009-02-19 09:04:33 UTC (rev 3938)
@@ -11,9 +11,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="gwt-rpc" exported="" />
- <orderEntry type="module" module-name="toplevel" />
- <orderEntry type="module" module-name="gwt-parent" />
+ <orderEntry type="module" module-name="toplevel" exported="" />
+ <orderEntry type="module" module-name="pvm" exported="" />
+ <orderEntry type="module" module-name="gwt-parent" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: cargo:cargo:jar:0.5:test">
<CLASSES>
Modified: jbpm4/trunk/modules/examples/jbpm4-examples.iml
===================================================================
--- jbpm4/trunk/modules/examples/jbpm4-examples.iml 2009-02-19 09:03:15 UTC (rev 3937)
+++ jbpm4/trunk/modules/examples/jbpm4-examples.iml 2009-02-19 09:04:33 UTC (rev 3938)
@@ -11,6 +11,7 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="toplevel" />
<orderEntry type="module" module-name="jpdl" />
+ <orderEntry type="module" module-name="pvm" />
<orderEntry type="module-library">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
Modified: jbpm4/trunk/modules/examples/pom.xml
===================================================================
--- jbpm4/trunk/modules/examples/pom.xml 2009-02-19 09:03:15 UTC (rev 3937)
+++ jbpm4/trunk/modules/examples/pom.xml 2009-02-19 09:04:33 UTC (rev 3938)
@@ -97,6 +97,25 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
\ No newline at end of file
Added: jbpm4/trunk/modules/examples/scripts/assembly-config.xml
===================================================================
--- jbpm4/trunk/modules/examples/scripts/assembly-config.xml (rev 0)
+++ jbpm4/trunk/modules/examples/scripts/assembly-config.xml 2009-02-19 09:04:33 UTC (rev 3938)
@@ -0,0 +1,19 @@
+<assembly 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/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ <id>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>../jpdl/target/</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>hypersonic/jbpm4DB.log</include>
+ <include>hypersonic/jbpm4DB.properties</include>
+ <include>hypersonic/jbpm4DB.script</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+w</assembly>
\ No newline at end of file
Modified: jbpm4/trunk/modules/jpdl/scripts/assembly-config.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/scripts/assembly-config.xml 2009-02-19 09:03:15 UTC (rev 3937)
+++ jbpm4/trunk/modules/jpdl/scripts/assembly-config.xml 2009-02-19 09:04:33 UTC (rev 3938)
@@ -16,6 +16,6 @@
<include>hibernate.cfg.*.xml</include>
<include>jbpm-*-ds.xml</include>
</includes>
- </fileSet>
+ </fileSet>
</fileSets>
</assembly>
\ No newline at end of file
Modified: jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml 2009-02-19 09:03:15 UTC (rev 3937)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml 2009-02-19 09:04:33 UTC (rev 3938)
@@ -4,12 +4,12 @@
<!-- JDBC connection properties (begin) -->
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">${jdbc.hsql.url}</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:file:${project.build.directory}/hypersonic/jbpm4DB</property>
<property name="hibernate.connection.username">${jdbc.hsql.username}</property>
<property name="hibernate.connection.password">${jdbc.hsql.password}</property>
<!-- JDBC connection properties (end) -->
<!-- Automatic schema creation (begin) -->
- <property name="hibernate.hbm2ddl.auto">create-drop</property>
+ <property name="hibernate.hbm2ddl.auto">create</property>
<!-- Automatic schema creation (end) -->
Modified: jbpm4/trunk/modules/test-db/jbpm4-test-db.iml
===================================================================
--- jbpm4/trunk/modules/test-db/jbpm4-test-db.iml 2009-02-19 09:03:15 UTC (rev 3937)
+++ jbpm4/trunk/modules/test-db/jbpm4-test-db.iml 2009-02-19 09:04:33 UTC (rev 3938)
@@ -16,6 +16,7 @@
<orderEntry type="module" module-name="jbpm4-toplevel" exported="" />
<orderEntry type="module" module-name="toplevel" exported="" />
<orderEntry type="module" module-name="jpdl" exported="" />
+ <orderEntry type="module" module-name="pvm" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
17 years, 2 months
JBoss JBPM SVN: r3937 - in jbpm4/trunk/modules/integration: jboss5 and 1 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-19 04:03:15 -0500 (Thu, 19 Feb 2009)
New Revision: 3937
Modified:
jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml
jbpm4/trunk/modules/integration/jboss5/pom.xml
jbpm4/trunk/modules/integration/pom.xml
jbpm4/trunk/modules/integration/spi/integration-spi.iml
jbpm4/trunk/modules/integration/spi/pom.xml
Log:
Fix module name
Modified: jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml 2009-02-19 09:02:57 UTC (rev 3936)
+++ jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml 2009-02-19 09:03:15 UTC (rev 3937)
@@ -10,7 +10,9 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="toplevel" exported="" />
+ <orderEntry type="module" module-name="integration-spi" exported="" />
<orderEntry type="module" module-name="jpdl" exported="" />
+ <orderEntry type="module" module-name="pvm" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.identity:idm-spi:jar:1.0.0-SNAPSHOT:compile">
<CLASSES>
Modified: jbpm4/trunk/modules/integration/jboss5/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/pom.xml 2009-02-19 09:02:57 UTC (rev 3936)
+++ jbpm4/trunk/modules/integration/jboss5/pom.xml 2009-02-19 09:03:15 UTC (rev 3937)
@@ -2,7 +2,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 - Integration JBoss 5</name>
+ <name>jBPM 4 - Integration JBoss 5</name>
<description>JBoss jBPM - JBoss JBoss 5</description>
<groupId>org.jbpm.jbpm4</groupId>
@@ -66,4 +66,4 @@
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
Modified: jbpm4/trunk/modules/integration/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/pom.xml 2009-02-19 09:02:57 UTC (rev 3936)
+++ jbpm4/trunk/modules/integration/pom.xml 2009-02-19 09:03:15 UTC (rev 3937)
@@ -2,7 +2,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 - Integration</name>
+ <name>jBPM 4 - Integration</name>
<description>JBoss jBPM - Integration</description>
<groupId>org.jbpm.jbpm4</groupId>
Modified: jbpm4/trunk/modules/integration/spi/integration-spi.iml
===================================================================
--- jbpm4/trunk/modules/integration/spi/integration-spi.iml 2009-02-19 09:02:57 UTC (rev 3936)
+++ jbpm4/trunk/modules/integration/spi/integration-spi.iml 2009-02-19 09:03:15 UTC (rev 3937)
@@ -9,8 +9,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="toplevel" />
- <orderEntry type="module" module-name="jpdl" />
+ <orderEntry type="module" module-name="toplevel" exported="" />
+ <orderEntry type="module" module-name="jpdl" exported="" />
+ <orderEntry type="module" module-name="pvm" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:test">
<CLASSES>
Modified: jbpm4/trunk/modules/integration/spi/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/spi/pom.xml 2009-02-19 09:02:57 UTC (rev 3936)
+++ jbpm4/trunk/modules/integration/spi/pom.xml 2009-02-19 09:03:15 UTC (rev 3937)
@@ -2,7 +2,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 - Integration SPI</name>
+ <name>jBPM 4 - Integration SPI</name>
<description>JBoss jBPM - Integration SPI</description>
<groupId>org.jbpm.jbpm4</groupId>
@@ -64,4 +64,4 @@
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
17 years, 2 months
JBoss JBPM SVN: r3936 - jbpm3/branches.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-02-19 04:02:57 -0500 (Thu, 19 Feb 2009)
New Revision: 3936
Added:
jbpm3/branches/jbpm-3.2.5.SP/
Log:
Recreate jbpm-3.2.5.SP from jbpm-3.2.5.SP1
Copied: jbpm3/branches/jbpm-3.2.5.SP (from rev 3935, jbpm3/tags/jbpm-3.2.5.SP1)
17 years, 2 months
JBoss JBPM SVN: r3935 - in jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar: src/test/config/mysql and 2 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-02-19 03:55:58 -0500 (Thu, 19 Feb 2009)
New Revision: 3935
Added:
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/mysql/mysql-connector-java-5.0.8.jar
Modified:
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/build.xml
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/java/org/jbpm/perf/AsyncCallTest.java
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/resources/log4j.properties
Log:
[JBPM-2043] Fix the build to allow for a single test to run
Modified: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/build.xml
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/build.xml 2009-02-19 06:51:06 UTC (rev 3934)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/build.xml 2009-02-19 08:55:58 UTC (rev 3935)
@@ -181,6 +181,22 @@
</junitreport>
</target>
+ <!--
+ Run a single junit test
+
+ ant -Dcustom.db.config=mysql -Dtest=org.jbpm.perf.AsyncCallTest one-test
+ -->
+ <target name="one-test"
+ depends="compile.test, test.dependencies"
+ description="run a single unit test">
+ <mkdir dir="target/test.results" />
+ <junit printsummary="yes" fork="no" showoutput="yes" maxmemory="500m">
+ <classpath refid="${test.classpath}" />
+ <formatter type="plain" />
+ <test name="${test}" todir="target/test.results"/>
+ </junit>
+ </target>
+
<!-- OLD STUFF -->
<target name="config.profile.default">
Added: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/mysql/mysql-connector-java-5.0.8.jar
===================================================================
(Binary files differ)
Property changes on: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/mysql/mysql-connector-java-5.0.8.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/java/org/jbpm/perf/AsyncCallTest.java
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/java/org/jbpm/perf/AsyncCallTest.java 2009-02-19 06:51:06 UTC (rev 3934)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/java/org/jbpm/perf/AsyncCallTest.java 2009-02-19 08:55:58 UTC (rev 3935)
@@ -21,6 +21,8 @@
*/
package org.jbpm.perf;
+// $Id: AsyncCallTest.java 3930 2009-02-18 17:19:18Z thomas.diesler(a)jboss.com $
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jbpm.command.CommandService;
@@ -33,67 +35,80 @@
import org.jbpm.graph.exe.ProcessInstance;
/**
- * This tests creates 10000 process instances. Every instance has an async call
- * to the test class. See JIRA bugs SOA-1175 and JBPM-2043.
+ * This tests creates a constant number of process instances.
+ * Every instance has an async call to an ActionHandler.
*
- * @author mvecera(a)redhat.com, pmacik(a)redhat.com
+ * See JIRA bugs SOA-1175 and JBPM-2043.
+ *
+ * @author mvecera(a)redhat.com
+ * @author pmacik(a)redhat.com
+ * @author thomas.diesler(a)jboss.com
+ * @since 18-Feb-2009
*/
-public class AsyncCallTest extends AbstractDbTestCase implements ActionHandler {
- private static final Log log = LogFactory.getLog(AsyncCallTest.class);
- private static final long serialVersionUID = -2962894670623757448L;
- private CommandService commandService = new CommandServiceImpl(getJbpmConfiguration());
- private static final int INSTANCES = 10000;
- ProcessDefinition processDefinition;
+public class AsyncCallTest extends AbstractDbTestCase
+{
+ private static final Log log = LogFactory.getLog(AsyncCallTest.class);
+
+ private CommandService commandService = new CommandServiceImpl(getJbpmConfiguration());
+ private static final int INSTANCES = 1000;
+ private static int count;
+
+ ProcessDefinition processDefinition;
- public void setUp() throws Exception {
- super.setUp();
- createSchema();
- processDefinition = ProcessDefinition.parseXmlString(
- "<process-definition xmlns=\"urn:jbpm.org:jpdl-3.1\" name=\"processDefinition1\">" +
- "<start-state name=\"start\">" +
- "<transition name=\"to_state\" to=\"end\">" +
- "<action class=\"org.jbpm.perf.AsyncCallTest\" />" +
- "</transition>" +
- "</start-state>" +
- "<end-state name=\"end\">" +
- "</end-state>" +
- "</process-definition>");
- saveAndReload(processDefinition);
- }
+ public void setUp() throws Exception
+ {
+ super.setUp();
+
+ processDefinition = ProcessDefinition.parseXmlString(
+ "<process-definition xmlns='urn:jbpm.org:jpdl-3.1' name='processDefinition1'>" +
+ " <start-state name='start'>" +
+ " <transition name='to_state' to='end'>" +
+ " <action class='" + PerfActionHandler.class.getName() + "'/>" +
+ " </transition>" +
+ " </start-state>" +
+ " <end-state name='end'/>" +
+ "</process-definition>");
+
+ saveAndReload(processDefinition);
+ }
- public void tearDown() throws Exception {
- beginSessionTransaction();
- jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition.getId());
- super.tearDown();
- }
+ public void tearDown() throws Exception
+ {
+ beginSessionTransaction();
+ jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition.getId());
+ super.tearDown();
+ }
- public void testAsyncCall() {
- log.info("");
- log.info("=== EXECUTING PERFORMANCE TEST ================================================");
- log.info("");
+ public void testAsyncCall()
+ {
+ long start = System.currentTimeMillis();
- long start = System.currentTimeMillis();
+ commitAndCloseSession();
+ startJobExecutor();
+ for (count = 0; count < INSTANCES; count++)
+ {
+ beginSessionTransaction();
+ StartProcessInstanceCommand startCommand = new StartProcessInstanceCommand();
+ startCommand.setProcessId(processDefinition.getId());
+ startCommand.setProcessName("processDefinition1");
+ ProcessInstance pi = (ProcessInstance)commandService.execute(startCommand);
commitAndCloseSession();
- startJobExecutor();
+ }
- for (int i = 0; i < INSTANCES; i++) {
- beginSessionTransaction();
- StartProcessInstanceCommand startCommand = new StartProcessInstanceCommand();
- startCommand.setProcessId(processDefinition.getId());
- startCommand.setProcessName("processDefinition1");
- ProcessInstance pi = (ProcessInstance) commandService.execute(startCommand);
- commitAndCloseSession();
- }
+ stopJobExecutor();
- stopJobExecutor();
+ long stop = System.currentTimeMillis();
+ System.out.println("=== Test finished processing " + INSTANCES + " instances in " + (stop - start) + "ms ===");
+ System.out.println("=== This is " + Math.round(1000 * INSTANCES / (stop - start)) + " instances per second ===");
+ }
- long stop = System.currentTimeMillis();
- log.info("=== TEST FINISHED PROCESSING " + INSTANCES + " INSTANCES IN " + (stop - start) + " MILLIS ===");
- log.info("=== THIS IS " + INSTANCES / ((double) (stop - start) / 1000) + " PROCESSES PER SECOND ===");
- }
+ public static class PerfActionHandler implements ActionHandler
+ {
+ public void execute(ExecutionContext executionContext) throws Exception
+ {
+ //System.out.println(count);
+ }
+ }
+}
- public void execute(ExecutionContext executionContext) throws Exception {
- // no-op
- }
-}
Modified: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/resources/log4j.properties
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/resources/log4j.properties 2009-02-19 06:51:06 UTC (rev 3934)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/resources/log4j.properties 2009-02-19 08:55:58 UTC (rev 3935)
@@ -1,11 +1,20 @@
# Set root logger level to DEBUG and its only appender to CONSOLE.
-log4j.rootLogger=DEBUG, CONSOLE
+log4j.rootLogger=DEBUG, LOGFILE
# CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%t] %-5p %C{1} : %m%n
+log4j.appender.CONSOLE.Threshold=INFO
+# LOGFILE is set to be a File appender using a PatternLayout.
+log4j.appender.LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.LOGFILE.File=target/test.log
+log4j.appender.LOGFILE.Append=true
+log4j.appender.LOGFILE.Threshold=DEBUG
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+
# LIMIT CATEGORIES
log4j.logger.org.jbpm=DEBUG
#log4j.logger.org.jbpm.graph=DEBUG
17 years, 2 months
JBoss JBPM SVN: r3934 - in jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config: hsqldb and 3 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-02-19 01:51:06 -0500 (Thu, 19 Feb 2009)
New Revision: 3934
Added:
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/hsqldb/
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/hsqldb/hibernate.properties
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/mysql/
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/mysql/hibernate.properties
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/postgresql/
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/postgresql/hibernate.properties
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/sybase/
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/sybase/hibernate.properties
Log:
JBPM-2043: add database properties
Added: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/hsqldb/hibernate.properties
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/hsqldb/hibernate.properties (rev 0)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/hsqldb/hibernate.properties 2009-02-19 06:51:06 UTC (rev 3934)
@@ -0,0 +1,8 @@
+# hibernate dialect
+hibernate.dialect org.hibernate.dialect.HSQLDialect
+
+# JDBC connection properties
+hibernate.connection.driver_class org.hsqldb.jdbcDriver
+hibernate.connection.url jdbc:hsqldb:mem:jbpm
+hibernate.connection.username sa
+hibernate.connection.password
Added: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/mysql/hibernate.properties
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/mysql/hibernate.properties (rev 0)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/mysql/hibernate.properties 2009-02-19 06:51:06 UTC (rev 3934)
@@ -0,0 +1,9 @@
+# hibernate dialect
+hibernate.dialect org.hibernate.dialect.MySQL5InnoDBDialect
+
+# JDBC connection properties
+hibernate.connection.driver_class com.mysql.jdbc.Driver
+hibernate.connection.url jdbc:mysql://localhost:3306/jbpmtest
+hibernate.connection.username jbpmtest
+hibernate.connection.password
+hibernate.query.substitutions true 1, false 0
Added: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/postgresql/hibernate.properties
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/postgresql/hibernate.properties (rev 0)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/postgresql/hibernate.properties 2009-02-19 06:51:06 UTC (rev 3934)
@@ -0,0 +1,14 @@
+# System Service QA Database PostgreSQL
+# https://wiki.corp.jboss.com/bin/view/IT/SystemServiceQaDatabasePostgresql
+
+# Install PostgreSQL on Fedora
+# http://www.jboss.org/community/docs/DOC-13270
+
+# hibernate dialect
+hibernate.dialect org.hibernate.dialect.PostgreSQLDialect
+
+# JDBC connection properties
+hibernate.connection.driver_class org.postgresql.Driver
+hibernate.connection.url jdbc:postgresql://localhost:5432/jbpmtest
+hibernate.connection.username jbpmtest
+hibernate.connection.password
Added: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/sybase/hibernate.properties
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/sybase/hibernate.properties (rev 0)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/sybase/hibernate.properties 2009-02-19 06:51:06 UTC (rev 3934)
@@ -0,0 +1,17 @@
+# System Service QA Database Sybase
+# https://wiki.corp.jboss.com/bin/view/IT/SystemServiceQaDatabaseSybase
+
+# Install Sybase ASE 15.0.2 on Fedora
+# https://www.jboss.org/community/docs/DOC-12932
+
+# jBPM 3.3 on Sybase ASE 15
+# http://www.jboss.org/community/docs/DOC-12936
+
+# hibernate dialect
+hibernate.dialect org.hibernate.dialect.SybaseDialect
+
+# JDBC connection properties
+hibernate.connection.driver_class net.sourceforge.jtds.jdbc.Driver
+hibernate.connection.url jdbc:jtds:sybase://localhost:5000/jbpmtest
+hibernate.connection.username jbpmtest
+hibernate.connection.password jbpmtest
17 years, 2 months
JBoss JBPM SVN: r3933 - in jbpm3/branches/jpdl-3.2.2-SOA-4.2: jpdl/examples and 2 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-02-19 01:38:44 -0500 (Thu, 19 Feb 2009)
New Revision: 3933
Modified:
jbpm3/branches/jpdl-3.2.2-SOA-4.2/build/build.properties
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/examples/build.xml
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/main/java/org/jbpm/db/hibernate/HibernateHelper.java
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/readme.txt
Log:
JBPM-2043: recall jpdl-jar testsuite
Modified: jbpm3/branches/jpdl-3.2.2-SOA-4.2/build/build.properties
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/build/build.properties 2009-02-19 00:36:21 UTC (rev 3932)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/build/build.properties 2009-02-19 06:38:44 UTC (rev 3933)
@@ -44,7 +44,7 @@
# BROWSER PROPERTIES
windows.browser=C:/Program Files/Internet Explorer/IEXPLORE.EXE
macos.browser=/usr/bin/open
-linux.browser=mozilla
+linux.browser=firefox
# The remainder section of this configuration file should
# typically not be customized.
Modified: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/examples/build.xml
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/examples/build.xml 2009-02-19 00:36:21 UTC (rev 3932)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/examples/build.xml 2009-02-19 06:38:44 UTC (rev 3933)
@@ -138,7 +138,7 @@
<!-- define the jbpm tasks with the hibernate configurations in the classpath -->
<taskdef resource="org/jbpm/ant/jbpm.ant.tasks.properties">
<classpath>
- <pathelement path="target/dbconfig" />
+ <pathelement location="target/dbconfig" />
<pathelement location="${lib.jbpm.jpdl.jar.local}"/>
<pathelement location="${lib.jbpm.identity.jar.local}"/>
<path refid="libs.classpath"/>
Modified: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/main/java/org/jbpm/db/hibernate/HibernateHelper.java
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/main/java/org/jbpm/db/hibernate/HibernateHelper.java 2009-02-19 00:36:21 UTC (rev 3932)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/main/java/org/jbpm/db/hibernate/HibernateHelper.java 2009-02-19 06:38:44 UTC (rev 3933)
@@ -100,7 +100,7 @@
// load the properties
Properties properties = loadPropertiesFromResource(propertiesResource);
// and overwrite the properties with the specified properties
- configuration.setProperties(properties);
+ configuration.addProperties(properties);
}
return configuration;
Modified: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/readme.txt
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/readme.txt 2009-02-19 00:36:21 UTC (rev 3932)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/config/readme.txt 2009-02-19 06:38:44 UTC (rev 3933)
@@ -1,8 +1,8 @@
This directory contains a template for the database test
configuration properties.
-To get started, copy this directory to ${user.home}/jbpm/dbtests
-so all the database dirs are then located in ${user.home}/jbpm/dbtests/config
+To get started, copy this directory to ${user.home}/jbpm/dbtests/
+so that the database dirs are located in ${user.home}/jbpm/dbtests/config
Usage is as follows:
@@ -14,5 +14,5 @@
the default configurations as in jpdl/jar/src/main/config for the test run
3) Put the driver jar files for the database in
-${user.home}/jbpm/dbtests/config/${custom.db.config}/*.jar So e.g. the oracle driver jar
-file could have the following location: ${user.home}/jbpm/dbtests/config/oracle/classes12.jar
\ No newline at end of file
+${user.home}/jbpm/dbtests/driver/${custom.db.config}/*.jar e.g. the oracle driver jar
+would have the following location: ${user.home}/jbpm/dbtests/driver/oracle/classes12.jar
17 years, 2 months
JBoss JBPM SVN: r3932 - in jbpm3/trunk/modules: core/src/main/java/org/jbpm/command and 13 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-02-18 19:36:21 -0500 (Wed, 18 Feb 2009)
New Revision: 3932
Added:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java
Removed:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/EventCallback.java
jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfigurationTestHelper.java
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java
jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractCancelCommand.java
jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractProcessInstanceBaseCommand.java
jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractTokenBaseCommand.java
jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/JobExecutor.java
jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/LockMonitorThread.java
jbpm3/trunk/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java
jbpm3/trunk/modules/core/src/main/java/org/jbpm/util/XmlUtil.java
jbpm3/trunk/modules/core/src/test/java/org/jbpm/JbpmConfigurationTest.java
jbpm3/trunk/modules/core/src/test/java/org/jbpm/SerializabilityTest.java
jbpm3/trunk/modules/core/src/test/java/org/jbpm/instantiation/ConfigurableClassloadersTest.java
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1135/JBPM1135Test.java
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1452/JBPM1452Test.java
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1755/JBPM1755Test.java
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/AbstractEnterpriseTestCase.java
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/jms/JmsMessageTest.java
Log:
JBPM-2043: address some warnings in the findbugs report
Deleted: jbpm3/trunk/modules/core/src/main/java/org/jbpm/EventCallback.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/EventCallback.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/EventCallback.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -1,187 +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;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.jbpm.graph.def.Event;
-
-public class EventCallback implements Serializable {
-
- public static final int DEFAULT_TIMEOUT = 60 * 1000;
-
- private static final long serialVersionUID = 1L;
- private static final Log log = LogFactory.getLog(EventCallback.class);
-
- private static final Map<String, Semaphore> eventSemaphores = new HashMap<String, Semaphore>();
-
- public void processStart() {
- registerNotification(Event.EVENTTYPE_PROCESS_START);
- }
-
- public void processEnd() {
- registerNotification(Event.EVENTTYPE_PROCESS_END);
- }
-
- public void nodeEnter() {
- registerNotification(Event.EVENTTYPE_NODE_ENTER);
- }
-
- public void nodeLeave() {
- registerNotification(Event.EVENTTYPE_NODE_LEAVE);
- }
-
- public void taskCreate() {
- registerNotification(Event.EVENTTYPE_TASK_CREATE);
- }
-
- public void taskEnd() {
- registerNotification(Event.EVENTTYPE_TASK_END);
- }
-
- public void timerCreate() {
- registerNotification(Event.EVENTTYPE_TIMER_CREATE);
- }
-
- public void timer() {
- registerNotification(Event.EVENTTYPE_TIMER);
- }
-
- public void transition() {
- registerNotification(Event.EVENTTYPE_TRANSITION);
- }
-
- private static void registerNotification(final String event) {
- Synchronization notification = new Synchronization() {
-
- public void beforeCompletion() {
- }
-
- public void afterCompletion(int status) {
- if (status == Status.STATUS_COMMITTED) {
- log.debug("sending '" + event + "' notification");
- Semaphore eventSemaphore = getEventSemaphore(event);
- eventSemaphore.release();
- }
- else {
- log.warn("not sending '" + event + "' notification, transaction is " + statusToString(status));
- }
- }
- };
- JbpmContext.getCurrentJbpmContext()
- .getSession()
- .getTransaction()
- .registerSynchronization(notification);
- }
-
- private static String statusToString(int status) {
- String text;
- switch (status) {
- case Status.STATUS_ACTIVE:
- text = "active";
- break;
- case Status.STATUS_COMMITTED:
- text = "committed";
- break;
- case Status.STATUS_COMMITTING:
- text = "committing";
- break;
- case Status.STATUS_MARKED_ROLLBACK:
- text = "marked for rollback";
- break;
- case Status.STATUS_NO_TRANSACTION:
- text = "absent";
- break;
- case Status.STATUS_PREPARED:
- text = "prepared";
- break;
- case Status.STATUS_PREPARING:
- text = "preparing";
- break;
- case Status.STATUS_ROLLEDBACK:
- text = "rolled back";
- break;
- case Status.STATUS_ROLLING_BACK:
- text = "rolling back";
- break;
- case Status.STATUS_UNKNOWN:
- default:
- text = "in unknown status";
- break;
- }
- return text;
- }
-
- public static void waitForEvent(String event) {
- waitForEvent(event, DEFAULT_TIMEOUT);
- }
-
- public static void waitForEvent(String event, long timeout) {
- log.debug("waiting for " + event);
- Semaphore eventSemaphore = getEventSemaphore(event);
- try {
- if (eventSemaphore.tryAcquire(timeout, TimeUnit.MILLISECONDS)) {
- log.debug("received '" + event + "' notification");
- }
- else {
- log.warn("event '" + event + "' did not occur within " + timeout + " ms");
- }
- }
- catch (InterruptedException e) {
- // reassert interruption
- Thread.currentThread().interrupt();
- }
- }
-
- private static Semaphore getEventSemaphore(String event) {
- synchronized (eventSemaphores) {
- Semaphore semaphore = eventSemaphores.get(event);
- if (semaphore == null) {
- semaphore = new Semaphore(0);
- eventSemaphores.put(event, semaphore);
- }
- return semaphore;
- }
- }
-
- public static void clear() {
- synchronized (eventSemaphores) {
- for (Map.Entry<String, Semaphore> entry : eventSemaphores.entrySet()) {
- int permits = entry.getValue().drainPermits();
- if (permits != 0) {
- log.warn("event '" + entry.getKey() + "' has " + permits + " outstanding notifications");
- }
- }
- eventSemaphores.clear();
- }
- }
-}
\ No newline at end of file
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -24,9 +24,9 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.Serializable;
+import java.lang.ref.SoftReference;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import java.util.List;
@@ -254,14 +254,14 @@
private static final long serialVersionUID = 1L;
static ObjectFactory defaultObjectFactory;
- static Map<String, JbpmConfiguration> instances = new HashMap<String, JbpmConfiguration>();
- static ThreadLocal<List<JbpmConfiguration>> jbpmConfigurationsStacks = new ListThreadLocal<JbpmConfiguration>();
+ static final Map<String, SoftReference<JbpmConfiguration>> instances = new HashMap<String, SoftReference<JbpmConfiguration>>();
+ static final ThreadLocal<List<JbpmConfiguration>> jbpmConfigurationStacks = new StackThreadLocal<JbpmConfiguration>();
private ObjectFactory objectFactory;
private JobExecutor jobExecutor;
- private ThreadLocal<List<JbpmContext>> jbpmContextStacks = new ListThreadLocal<JbpmContext>();
+ private final ThreadLocal<List<JbpmContext>> jbpmContextStacks = new StackThreadLocal<JbpmContext>();
- static class ListThreadLocal<E> extends ThreadLocal<List<E>> {
+ static class StackThreadLocal<E> extends ThreadLocal<List<E>> {
@Override
protected List<E> initialValue() {
return new ArrayList<E>();
@@ -280,38 +280,34 @@
if (resource == null) {
resource = "jbpm.cfg.xml";
}
- JbpmConfiguration instance = null;
+
+ JbpmConfiguration instance;
synchronized (instances) {
- instance = instances.get(resource);
- if (instance == null) {
+ // look for configuration in cache
+ SoftReference<JbpmConfiguration> instanceRef = instances.get(resource);
+ if (instanceRef == null || (instance = instanceRef.get()) == null) {
+ // configuration does not exist or was evicted, construct it
if (defaultObjectFactory != null) {
- log.debug("creating jbpm configuration from given default object factory '"
- + defaultObjectFactory
- + "'");
+ log.debug("creating configuration from default object factory: " + defaultObjectFactory);
instance = new JbpmConfiguration(defaultObjectFactory);
}
else {
- try {
- log.info("using jbpm configuration resource '" + resource + "'");
- InputStream jbpmCfgXmlStream = ClassLoaderUtil.getJbpmConfigurationStream(resource);
- /*
- * if a custom resource is specified, but not found in the classpath, log a warning
- * (otherwise, users who want to load custom stuff will be confused if the resource is
- * not found and not loaded, without any notice)
- */
- if (jbpmCfgXmlStream == null && !"jbpm.cfg.xml".equals(resource)) {
- log.warn("jbpm configuration resource '" + resource + "' is not available");
- }
- ObjectFactory objectFactory = parseObjectFactory(jbpmCfgXmlStream);
- instance = createJbpmConfiguration(objectFactory);
+ log.info("using configuration resource: " + resource);
+ InputStream jbpmCfgXmlStream = ClassLoaderUtil.getJbpmConfigurationStream(resource);
+ /*
+ * if a custom resource is specified, but not found in the classpath, log a warning;
+ * otherwise, users who want to load custom stuff will not receive any feedback when their
+ * resource cannot be found
+ */
+ if (jbpmCfgXmlStream == null && !"jbpm.cfg.xml".equals(resource)) {
+ log.warn("configuration resource '" + resource + "' could not be found");
}
- catch (RuntimeException e) {
- throw new JbpmException("couldn't parse jbpm configuration from resource '"
- + resource
- + "'", e);
- }
+ ObjectFactory objectFactory = parseObjectFactory(jbpmCfgXmlStream);
+ instance = createJbpmConfiguration(objectFactory);
}
- instances.put(resource, instance);
+ // put configuration in cache
+ instanceRef = new SoftReference<JbpmConfiguration>(instance);
+ instances.put(resource, instanceRef);
}
}
return instance;
@@ -322,7 +318,7 @@
if (resource == null) {
resource = "jbpm.cfg.xml";
}
- if ((instances != null) && (instances.containsKey(resource))) {
+ if (instances != null && instances.containsKey(resource)) {
hasInstance = true;
}
return hasInstance;
@@ -332,7 +328,8 @@
log.debug("loading defaults in jbpm configuration");
ObjectFactoryParser objectFactoryParser = new ObjectFactoryParser();
ObjectFactoryImpl objectFactoryImpl = new ObjectFactoryImpl();
- objectFactoryParser.parseElementsFromResource("org/jbpm/default.jbpm.cfg.xml", objectFactoryImpl);
+ objectFactoryParser.parseElementsFromResource("org/jbpm/default.jbpm.cfg.xml",
+ objectFactoryImpl);
if (inputStream != null) {
log.debug("loading specific configuration...");
@@ -370,22 +367,21 @@
}
private static boolean getHideStaleObjectExceptions(ObjectFactory objectFactory) {
- if (!objectFactory.hasObject("jbpm.hide.stale.object.exceptions")) {
- return true;
- }
+ if (!objectFactory.hasObject("jbpm.hide.stale.object.exceptions")) return true;
+
Object object = objectFactory.createObject("jbpm.hide.stale.object.exceptions");
return object instanceof Boolean ? ((Boolean) object).booleanValue() : true;
}
public static JbpmConfiguration parseInputStream(InputStream inputStream) {
+ log.debug("creating jbpm configuration from input stream");
ObjectFactory objectFactory = parseObjectFactory(inputStream);
- log.debug("creating jbpm configuration from input stream");
return createJbpmConfiguration(objectFactory);
}
public static JbpmConfiguration parseResource(String resource) {
+ log.debug("creating jbpm configuration from resource: " + resource);
InputStream inputStream = null;
- log.debug("creating jbpm configuration from resource '" + resource + "'");
if (resource != null) {
inputStream = ClassLoaderUtil.getJbpmConfigurationStream(resource);
}
@@ -488,8 +484,7 @@
}
public void cleanSchema(String jbpmContextName) {
- DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory) getServiceFactory(Services.SERVICENAME_PERSISTENCE, jbpmContextName);
- persistenceServiceFactory.cleanSchema();
+ getPersistenceServiceFactory(jbpmContextName).cleanSchema();
}
public void createSchema() {
@@ -497,8 +492,7 @@
}
public void createSchema(String jbpmContextName) {
- DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory) getServiceFactory(Services.SERVICENAME_PERSISTENCE, jbpmContextName);
- persistenceServiceFactory.createSchema();
+ getPersistenceServiceFactory(jbpmContextName).createSchema();
}
public void dropSchema() {
@@ -506,10 +500,14 @@
}
public void dropSchema(String jbpmContextName) {
- DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory) getServiceFactory(Services.SERVICENAME_PERSISTENCE, jbpmContextName);
- persistenceServiceFactory.dropSchema();
+ getPersistenceServiceFactory(jbpmContextName).dropSchema();
}
+ private DbPersistenceServiceFactory getPersistenceServiceFactory(String jbpmContextName) {
+ return (DbPersistenceServiceFactory) getServiceFactory(Services.SERVICENAME_PERSISTENCE,
+ jbpmContextName);
+ }
+
public void close() {
close(JbpmContext.DEFAULT_JBPM_CONTEXT_NAME);
}
@@ -518,6 +516,7 @@
// stop job executor
if (jobExecutor != null) {
jobExecutor.stop();
+ jobExecutor = null;
}
JbpmContext jbpmContext = createJbpmContext(jbpmContextName);
@@ -538,18 +537,21 @@
// release context stack
jbpmContextStacks.remove();
- // remove from configurations map
+ // remove from configuration cache
synchronized (instances) {
- Iterator<JbpmConfiguration> iter = instances.values().iterator();
- while (iter.hasNext()) {
- if (this == iter.next()) {
- iter.remove();
- break;
+ for (SoftReference<JbpmConfiguration> instanceRef : instances.values()) {
+ if (this == instanceRef.get()) {
+ instanceRef.clear();
}
}
}
}
+ @Override
+ protected void finalize() throws Throwable {
+ close();
+ }
+
static JbpmConfiguration getCurrentJbpmConfiguration() {
JbpmConfiguration currentJbpmConfiguration = null;
List<JbpmConfiguration> stack = getJbpmConfigurationStack();
@@ -560,7 +562,7 @@
}
static List<JbpmConfiguration> getJbpmConfigurationStack() {
- return jbpmConfigurationsStacks.get();
+ return jbpmConfigurationStacks.get();
}
synchronized void pushJbpmConfiguration() {
@@ -591,14 +593,17 @@
void popJbpmContext(JbpmContext jbpmContext) {
List<JbpmContext> stack = getJbpmContextStack();
if (stack.isEmpty()) {
- throw new JbpmException(
- "closed JbpmContext more than once... check your try-finally's around JbpmContexts blocks");
+ throw new JbpmException("closed JbpmContext more than once... "
+ + "check your try-finally clauses around JbpmContext blocks");
}
- JbpmContext popped = stack.remove(stack.size() - 1);
- if (jbpmContext != popped) {
- stack.remove(jbpmContext); // prevent context from remaining in the stack
- throw new JbpmException(
- "closed JbpmContext in some order that differs from creation... check your try-finally's around JbpmContexts blocks");
+ JbpmContext topContext = stack.remove(stack.size() - 1);
+ if (jbpmContext != topContext) {
+ // put the other context back
+ stack.add(topContext);
+ // prevent our context from remaining in the stack
+ stack.remove(jbpmContext);
+ throw new JbpmException("closed JbpmContext in some order that differs from creation... "
+ + "check your try-finally clauses around JbpmContext blocks");
}
}
@@ -618,12 +623,13 @@
public synchronized JobExecutor getJobExecutor() {
if (jobExecutor == null) {
- try {
- jobExecutor = (JobExecutor) this.objectFactory.createObject("jbpm.job.executor");
+ Object object = objectFactory.createObject("jbpm.job.executor");
+ if (object instanceof JobExecutor) {
+ jobExecutor = (JobExecutor) object;
}
- catch (ClassCastException e) {
- throw new JbpmException("jbpm configuration object under key 'jbpm.job.executor' is not a "
- + JobExecutor.class.getName(), e);
+ else if (object != null) {
+ throw new JbpmException("configuration object named 'jbpm.job.executor' is not a "
+ + JobExecutor.class.getSimpleName());
}
}
return jobExecutor;
Deleted: jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfigurationTestHelper.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfigurationTestHelper.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/JbpmConfigurationTestHelper.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -1,31 +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;
-
-public class JbpmConfigurationTestHelper
-{
- public static void reset()
- {
- JbpmConfiguration.defaultObjectFactory = null;
- JbpmConfiguration.instances.clear();
- }
-}
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractCancelCommand.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractCancelCommand.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractCancelCommand.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -21,7 +21,7 @@
* in order to indicate that this process has been 'canceled' and not just ended.
* Value of the variable is the timestamp of cancellation.
*/
- public static String CANCELLATION_INDICATOR_VARIABLE_NAME = "canceled";
+ public static final String CANCELLATION_INDICATOR_VARIABLE_NAME = "canceled";
protected transient JbpmContext jbpmContext = null;
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractProcessInstanceBaseCommand.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractProcessInstanceBaseCommand.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractProcessInstanceBaseCommand.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -12,17 +12,13 @@
import org.jbpm.graph.exe.ProcessInstance;
/**
- * Abstract base class for all commands working on {@link org.jbpm.graph.exe.ProcessInstance}s.
+ * Abstract base class for all commands working on {@link org.jbpm.graph.exe.ProcessInstance}s. The
+ * {@link ProcessInstance} can either be specified by id or multiple ids. The alternative is to
+ * specify a {@link ProcessDefinition} name and version. In this case <b>all</b> found
+ * {@link ProcessInstance}s are processed. If no version is specified, <b>all</b> versions are taken
+ * into account. if onlyRunning is set to false (default is true) already ended
+ * {@link ProcessInstance}s are processed too.
*
- * The {@link ProcessInstance} can either be specified by id or multiple ids.
- *
- * The alternative is to specify a {@link ProcessDefinition} name and version.
- * In this case <b>all</b> found {@link ProcessInstance}s are processed.
- * If no version is specified, <b>all</b> versions are taken into account.
- *
- * if onlyRunning is set to false (default is true) already ended {@link ProcessInstance}s
- * are processed too.
- *
* @author bernd.ruecker(a)camunda.com
*/
public abstract class AbstractProcessInstanceBaseCommand extends AbstractBaseCommand
@@ -36,15 +32,16 @@
private boolean onlyRunning = true;
private boolean operateOnSingleObject;
-
+
private transient JbpmContext jbpmContext;
public AbstractProcessInstanceBaseCommand()
{
super();
}
-
- protected JbpmContext getJbpmContext() {
+
+ protected JbpmContext getJbpmContext()
+ {
return jbpmContext;
}
@@ -52,67 +49,71 @@
{
ArrayList result = new ArrayList();
this.jbpmContext = jbpmContext;
- try {
+ try
+ {
log.debug("executing " + this);
-
+
// batch tokens
if (processInstanceIds != null && processInstanceIds.length > 0)
{
for (int i = 0; i < processInstanceIds.length; i++)
{
ProcessInstance pi = jbpmContext.loadProcessInstanceForUpdate(processInstanceIds[i]);
- result.add(
- execute(pi));
+ result.add(execute(pi));
}
}
-
+
// search for ProcessInstances according to parameters
if (processName != null)
{
operateOnSingleObject = false;
-
+
GetProcessInstancesCommand cmd = new GetProcessInstancesCommand();
cmd.setProcessDefinitionName(processName);
cmd.setOnlyRunning(onlyRunning);
- if (processVersion>0)
- cmd.setVersion(String.valueOf(processVersion));
-
- // Query query = null;
- // if (processVersion>0) {
- // query = jbpmContext.getSession().getNamedQuery("GraphSession.findProcessDefinitionByNameAndVersion");
- // query.setInteger("version", processVersion);
- // }
- // else {
- // query = jbpmContext.getSession().getNamedQuery("GraphSession.findTokensForProcessInNode");
- // }
- // query.setString("name", processName);
- List processInstanceList = (List)cmd.execute(jbpmContext);
-
+ if (processVersion > 0) cmd.setVersion(String.valueOf(processVersion));
+
+ // Query query = null;
+ // if (processVersion>0) {
+ // query =
+ // jbpmContext.getSession().getNamedQuery("GraphSession.findProcessDefinitionByNameAndVersion");
+ // query.setInteger("version", processVersion);
+ // }
+ // else {
+ // query =
+ // jbpmContext.getSession().getNamedQuery("GraphSession.findTokensForProcessInNode");
+ // }
+ // query.setString("name", processName);
+ List processInstanceList = (List) cmd.execute(jbpmContext);
+
Iterator iter = processInstanceList.iterator();
while (iter.hasNext())
{
- ProcessInstance pi = (ProcessInstance)iter.next();
+ ProcessInstance pi = (ProcessInstance) iter.next();
execute(pi);
}
}
-
- if (operateOnSingleObject) {
- if (result.size()<1)
+
+ if (operateOnSingleObject)
+ {
+ if (result.size() < 1)
return null;
- else
+ else
return result.get(0);
}
- else {
- return result;
+ else
+ {
+ return result;
}
}
- finally {
+ finally
+ {
this.jbpmContext = null;
}
}
public abstract ProcessInstance execute(ProcessInstance processInstance);
-
+
public void setProcessInstanceIds(long[] processInstanceIds)
{
this.operateOnSingleObject = false;
@@ -123,29 +124,37 @@
{
this.operateOnSingleObject = true;
this.processInstanceIds = new long[1];
- this.processInstanceIds[0] = processInstanceId;
+ this.processInstanceIds[0] = processInstanceId;
}
-
+
/**
* Overwrite toString to keep semantic of getAdditionalToStringInformation
*/
- public String toString() {
- if (processName!=null) {
- return this.getClass().getName()
- + " [tokenIds=" + Arrays.toString(processInstanceIds)
- + ";processName=" + processName
- + ";processVersion=" + (processVersion>0 ? processVersion : "NA")
- + getAdditionalToStringInformation()
- + "]";
+ public String toString()
+ {
+ if (processName != null)
+ {
+ return this.getClass().getName()
+ + " [tokenIds="
+ + Arrays.toString(processInstanceIds)
+ + ";processName="
+ + processName
+ + ";processVersion="
+ + (processVersion > 0 ? processVersion : "NA")
+ + getAdditionalToStringInformation()
+ + "]";
}
- else {
- return this.getClass().getName()
- + " [tokenIds=" + Arrays.toString(processInstanceIds)
- + ";operateOnSingleObject=" + operateOnSingleObject
- + getAdditionalToStringInformation()
- + "]";
+ else
+ {
+ return this.getClass().getName()
+ + " [tokenIds="
+ + Arrays.toString(processInstanceIds)
+ + ";operateOnSingleObject="
+ + operateOnSingleObject
+ + getAdditionalToStringInformation()
+ + "]";
}
- }
+ }
public String getProcessName()
{
@@ -156,7 +165,7 @@
{
this.processName = processName;
}
-
+
public int getProcessVersion()
{
return processVersion;
@@ -173,14 +182,18 @@
}
/**
- * return the process instance id in case only one
- * process instance id is set. Otherwise an {@link IllegalStateException}
- * is thrown
+ * return the process instance id in case only one process instance id is set. Otherwise an
+ * {@link IllegalStateException} is thrown
*/
public long getProcessInstanceId()
{
- if (processInstanceIds==null || processInstanceIds.length!=1)
- throw new IllegalStateException("getProcessInstanceId can only be called if only one process instance id is set on command " + this + " but was " + processInstanceIds);
+ if (processInstanceIds == null || processInstanceIds.length != 1)
+ {
+ throw new IllegalStateException("exactly one process instance id must be set on "
+ + this
+ + " to get processInstanceId property; found "
+ + Arrays.toString(processInstanceIds));
+ }
return processInstanceIds[0];
}
@@ -198,25 +211,25 @@
public AbstractProcessInstanceBaseCommand processInstanceIds(long[] processInstanceIds)
{
- setProcessInstanceIds( processInstanceIds );
+ setProcessInstanceIds(processInstanceIds);
return this;
}
public AbstractProcessInstanceBaseCommand processInstanceId(long processInstanceId)
{
- setProcessInstanceId(processInstanceId);
+ setProcessInstanceId(processInstanceId);
return this;
}
public AbstractProcessInstanceBaseCommand processName(String processName)
{
- setProcessName( processName );
+ setProcessName(processName);
return this;
}
-
+
public AbstractProcessInstanceBaseCommand processVersion(int processVersion)
{
- setProcessVersion( processVersion );
+ setProcessVersion(processVersion);
return this;
}
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractTokenBaseCommand.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractTokenBaseCommand.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/AbstractTokenBaseCommand.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -12,15 +12,11 @@
import org.jbpm.graph.exe.Token;
/**
- * Abstract base class for commands working on Tokens.
+ * Abstract base class for commands working on Tokens. The {@link Token} can either be specified by
+ * id or multiple ids. The alternative is to specify a {@link ProcessDefinition} name, a required
+ * node name and version. In this case <b>all</b> found {@link Token}s are processed. If no version
+ * is specified, <b>all</b> versions are taken into account.
*
- * The {@link Token} can either be specified by id or multiple ids.
- *
- * The alternative is to specify a {@link ProcessDefinition} name, a
- * required node name and version.
- * In this case <b>all</b> found {@link Token}s are processed.
- * If no version is specified, <b>all</b> versions are taken into account.
- *
* @author bernd.ruecker(a)camunda.com
*/
public abstract class AbstractTokenBaseCommand implements Command
@@ -31,74 +27,82 @@
private String processName = null;
private String stateName = null;
private int processVersion = 0;
-
+
private boolean operateOnSingleObject;
private transient JbpmContext jbpmContext;
+ private static final long serialVersionUID = 1L;
+
public AbstractTokenBaseCommand()
{
super();
}
-
- protected JbpmContext getJbpmContext() {
+
+ protected JbpmContext getJbpmContext()
+ {
return jbpmContext;
}
public Object execute(JbpmContext jbpmContext) throws Exception
{
this.jbpmContext = jbpmContext;
- try {
+ try
+ {
ArrayList result = new ArrayList();
log.debug("executing " + this);
-
+
// batch tokens
if (tokenIds != null && tokenIds.length > 0)
{
for (int i = 0; i < tokenIds.length; i++)
{
Token token = jbpmContext.loadTokenForUpdate(tokenIds[i]);
- result.add(
- execute(token));
+ result.add(execute(token));
}
}
-
+
// search for tokens in process/state
if (processName != null && stateName != null)
{
this.operateOnSingleObject = false;
-
+
Query query = null;
- if (processVersion>0) {
- query = jbpmContext.getSession().getNamedQuery("GraphSession.findTokensForProcessVersionInNode");
+ if (processVersion > 0)
+ {
+ query = jbpmContext.getSession().getNamedQuery(
+ "GraphSession.findTokensForProcessVersionInNode");
query.setInteger("processDefinitionVersion", processVersion);
}
- else {
- query = jbpmContext.getSession().getNamedQuery("GraphSession.findTokensForProcessInNode");
+ else
+ {
+ query = jbpmContext.getSession().getNamedQuery("GraphSession.findTokensForProcessInNode");
}
query.setString("processDefinitionName", processName);
query.setString("nodeName", stateName);
-
+
Iterator iter = query.list().iterator();
while (iter.hasNext())
{
- Token token = (Token)iter.next();
- result.add(
- execute(token));
+ Token token = (Token) iter.next();
+ result.add(execute(token));
}
}
-
- if (operateOnSingleObject) {
- if (result.size()<1)
+
+ if (operateOnSingleObject)
+ {
+ if (result.size() < 1)
return null;
- else
+ else
return result.get(0);
}
- else {
- return result;
+ else
+ {
+ return result;
}
}
- finally {
+ finally
+ {
this.jbpmContext = null;
}
}
@@ -117,8 +121,9 @@
this.tokenIds = new long[1];
this.tokenIds[0] = tokenId;
}
-
- public String getAdditionalToStringInformation() {
+
+ public String getAdditionalToStringInformation()
+ {
return "";
}
@@ -156,38 +161,51 @@
{
return tokenIds;
}
-
+
/**
- * return the process instance id in case only one
- * process instance id is set. Otherwise an {@link IllegalStateException}
- * is thrown
+ * return the process instance id in case only one process instance id is set. Otherwise an
+ * {@link IllegalStateException} is thrown
*/
public long getTokenId()
{
- if (tokenIds==null || tokenIds.length!=1)
- throw new IllegalStateException("getTokenIds can only be called if only one token id is set on command " + this + " but was " + tokenIds);
+ if (tokenIds == null || tokenIds.length != 1)
+ {
+ throw new IllegalStateException("exactly one token id must be set on "
+ + this
+ + " to get tokenId property; found "
+ + Arrays.toString(tokenIds));
+ }
return tokenIds[0];
- }
-
- public String toString() {
- if (processName!=null && stateName!=null) {
- return this.getClass().getName()
- + " [tokenIds=" + Arrays.toString(tokenIds)
- + ";processName=" + processName
- + ";processVersion=" + (processVersion>0 ? processVersion : "NA")
- + ";stateName=" + stateName
- + getAdditionalToStringInformation()
- + "]";
+ }
+
+ public String toString()
+ {
+ if (processName != null && stateName != null)
+ {
+ return this.getClass().getName()
+ + " [tokenIds="
+ + Arrays.toString(tokenIds)
+ + ";processName="
+ + processName
+ + ";processVersion="
+ + (processVersion > 0 ? processVersion : "NA")
+ + ";stateName="
+ + stateName
+ + getAdditionalToStringInformation()
+ + "]";
}
- else {
- return this.getClass().getName()
- + " [tokenIds=" + Arrays.toString(tokenIds)
- + ";operateOnSingleObject=" + operateOnSingleObject
- + getAdditionalToStringInformation()
- + "]";
+ else
+ {
+ return this.getClass().getName()
+ + " [tokenIds="
+ + Arrays.toString(tokenIds)
+ + ";operateOnSingleObject="
+ + operateOnSingleObject
+ + getAdditionalToStringInformation()
+ + "]";
}
}
-
+
// methods for fluent programming
public AbstractTokenBaseCommand tokenIds(long[] tokenIds)
@@ -201,7 +219,7 @@
setTokenId(tokenId);
return this;
}
-
+
public AbstractTokenBaseCommand processName(String processName)
{
setProcessName(processName);
@@ -218,5 +236,5 @@
{
setStateName(stateName);
return this;
- }
+ }
}
\ No newline at end of file
Copied: jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java (from rev 3859, jbpm3/trunk/modules/core/src/main/java/org/jbpm/EventCallback.java)
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java (rev 0)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/EventCallback.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -0,0 +1,187 @@
+/*
+ * 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.graph.def;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.jbpm.JbpmContext;
+
+public class EventCallback implements Serializable {
+
+ public static final int DEFAULT_TIMEOUT = 60 * 1000;
+
+ private static final long serialVersionUID = 1L;
+ private static final Log log = LogFactory.getLog(EventCallback.class);
+
+ private static final Map<String, Semaphore> eventSemaphores = new HashMap<String, Semaphore>();
+
+ public void processStart() {
+ registerNotification(Event.EVENTTYPE_PROCESS_START);
+ }
+
+ public void processEnd() {
+ registerNotification(Event.EVENTTYPE_PROCESS_END);
+ }
+
+ public void nodeEnter() {
+ registerNotification(Event.EVENTTYPE_NODE_ENTER);
+ }
+
+ public void nodeLeave() {
+ registerNotification(Event.EVENTTYPE_NODE_LEAVE);
+ }
+
+ public void taskCreate() {
+ registerNotification(Event.EVENTTYPE_TASK_CREATE);
+ }
+
+ public void taskEnd() {
+ registerNotification(Event.EVENTTYPE_TASK_END);
+ }
+
+ public void timerCreate() {
+ registerNotification(Event.EVENTTYPE_TIMER_CREATE);
+ }
+
+ public void timer() {
+ registerNotification(Event.EVENTTYPE_TIMER);
+ }
+
+ public void transition() {
+ registerNotification(Event.EVENTTYPE_TRANSITION);
+ }
+
+ private static void registerNotification(final String event) {
+ Synchronization notification = new Synchronization() {
+
+ public void beforeCompletion() {
+ }
+
+ public void afterCompletion(int status) {
+ if (status == Status.STATUS_COMMITTED) {
+ log.debug("sending '" + event + "' notification");
+ Semaphore eventSemaphore = getEventSemaphore(event);
+ eventSemaphore.release();
+ }
+ else {
+ log.warn("not sending '" + event + "' notification, transaction is " + statusToString(status));
+ }
+ }
+ };
+ JbpmContext.getCurrentJbpmContext()
+ .getSession()
+ .getTransaction()
+ .registerSynchronization(notification);
+ }
+
+ private static String statusToString(int status) {
+ String text;
+ switch (status) {
+ case Status.STATUS_ACTIVE:
+ text = "active";
+ break;
+ case Status.STATUS_COMMITTED:
+ text = "committed";
+ break;
+ case Status.STATUS_COMMITTING:
+ text = "committing";
+ break;
+ case Status.STATUS_MARKED_ROLLBACK:
+ text = "marked for rollback";
+ break;
+ case Status.STATUS_NO_TRANSACTION:
+ text = "absent";
+ break;
+ case Status.STATUS_PREPARED:
+ text = "prepared";
+ break;
+ case Status.STATUS_PREPARING:
+ text = "preparing";
+ break;
+ case Status.STATUS_ROLLEDBACK:
+ text = "rolled back";
+ break;
+ case Status.STATUS_ROLLING_BACK:
+ text = "rolling back";
+ break;
+ case Status.STATUS_UNKNOWN:
+ default:
+ text = "in unknown status";
+ break;
+ }
+ return text;
+ }
+
+ public static void waitForEvent(String event) {
+ waitForEvent(event, DEFAULT_TIMEOUT);
+ }
+
+ public static void waitForEvent(String event, long timeout) {
+ log.debug("waiting for " + event);
+ Semaphore eventSemaphore = getEventSemaphore(event);
+ try {
+ if (eventSemaphore.tryAcquire(timeout, TimeUnit.MILLISECONDS)) {
+ log.debug("received '" + event + "' notification");
+ }
+ else {
+ log.warn("event '" + event + "' did not occur within " + timeout + " ms");
+ }
+ }
+ catch (InterruptedException e) {
+ // reassert interruption
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ private static Semaphore getEventSemaphore(String event) {
+ synchronized (eventSemaphores) {
+ Semaphore semaphore = eventSemaphores.get(event);
+ if (semaphore == null) {
+ semaphore = new Semaphore(0);
+ eventSemaphores.put(event, semaphore);
+ }
+ return semaphore;
+ }
+ }
+
+ public static void clear() {
+ synchronized (eventSemaphores) {
+ for (Map.Entry<String, Semaphore> entry : eventSemaphores.entrySet()) {
+ int permits = entry.getValue().drainPermits();
+ if (permits != 0) {
+ log.warn("event '" + entry.getKey() + "' has " + permits + " outstanding notifications");
+ }
+ }
+ eventSemaphores.clear();
+ }
+ }
+}
\ No newline at end of file
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/JobExecutor.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/JobExecutor.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/JobExecutor.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -39,7 +39,7 @@
protected boolean isStarted = false;
- protected static String hostName;
+ private static String hostName;
public synchronized void start() {
if (!isStarted) {
@@ -47,8 +47,7 @@
for (int i = 0; i < nbrOfThreads; i++) {
startThread();
}
- lockMonitorThread = new LockMonitorThread(jbpmConfiguration, lockMonitorInterval,
- maxLockTime, lockBufferTime);
+ lockMonitorThread = new LockMonitorThread(this);
isStarted = true;
}
else {
@@ -114,7 +113,7 @@
}
private String getThreadName(int index) {
- return name + ":" + getHostAddress() + ":" + index;
+ return name + '@' + getHostAddress() + ':' + index;
}
private static String getHostAddress() {
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -39,6 +39,8 @@
this.maxLockTime = jobExecutor.getMaxLockTime();
}
+ /** @deprecated As of jBPM 3.2.6, replaced by {@link #JobExecutorThread(String, JobExecutor)} */
+ @Deprecated
public JobExecutorThread(String name, JobExecutor jobExecutor,
JbpmConfiguration jbpmConfiguration, int idleInterval, int maxIdleInterval, long maxLockTime,
int maxHistory) {
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/LockMonitorThread.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/LockMonitorThread.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/job/executor/LockMonitorThread.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -22,6 +22,15 @@
volatile boolean isActive = true;
+ public LockMonitorThread(JobExecutor jobExecutor) {
+ jbpmConfiguration = jobExecutor.getJbpmConfiguration();
+ lockMonitorInterval = jobExecutor.getLockMonitorInterval();
+ maxLockTime = jobExecutor.getMaxLockTime();
+ lockBufferTime = jobExecutor.getLockBufferTime();
+ }
+
+ /** @deprecated As of jBPM 3.2.6, replaced by {@link #LockMonitorThread(JobExecutor)} */
+ @Deprecated
public LockMonitorThread(JbpmConfiguration jbpmConfiguration, int lockMonitorInterval,
int maxLockTime, int lockBufferTime) {
this.jbpmConfiguration = jbpmConfiguration;
@@ -35,7 +44,7 @@
while (isActive) {
try {
unlockOverdueJobs();
- if ((isActive) && (lockMonitorInterval > 0)) {
+ if (isActive && lockMonitorInterval > 0) {
sleep(lockMonitorInterval);
}
}
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -156,11 +156,6 @@
}
}
- public void finalize() throws Throwable
- {
- close();
- }
-
public String getDataSourceJndiName()
{
return dataSourceJndiName;
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/util/XmlUtil.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/util/XmlUtil.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/util/XmlUtil.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -73,7 +73,7 @@
inputStream = ClassLoaderUtil.getStream(resource);
if (inputStream == null)
- throw new IllegalArgumentException("Cannot load resource: " + resource);
+ throw new IllegalArgumentException("resource not found: " + resource);
return parseXmlInputStream(inputStream);
}
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/JbpmConfigurationTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/JbpmConfigurationTest.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/JbpmConfigurationTest.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -36,7 +36,7 @@
super.setUp();
JbpmConfiguration.instances.clear();
JbpmConfiguration.defaultObjectFactory = null;
- JbpmConfiguration.jbpmConfigurationsStacks.remove();
+ JbpmConfiguration.jbpmConfigurationStacks.remove();
}
public void testSingleton() {
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/SerializabilityTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/SerializabilityTest.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/SerializabilityTest.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -33,23 +33,28 @@
String testRootDir = FileDefinitionFileSystemConfigTest.class.getProtectionDomain().getCodeSource().getLocation().getFile().toString();
static String[] excusedClasses = {
- "org.jbpm.ant",
+ "org.jbpm.ant.",
+ "org.jbpm.command.service.CommandServiceImpl",
"org.jbpm.context.exe.JbpmType",
"org.jbpm.db.hibernate.ConverterEnumType",
"org.jbpm.db.hibernate.Converters",
"org.jbpm.db.hibernate.JbpmNamingStrategy",
- "org.jbpm.db.jmx.JbpmService",
"org.jbpm.db.AbstractDbTestCase",
"org.jbpm.db.ContextSession",
"org.jbpm.db.FileSession",
"org.jbpm.db.GraphSession",
"org.jbpm.db.JbpmSession",
+ "org.jbpm.db.JbpmSchema",
"org.jbpm.db.JobSession",
"org.jbpm.db.LoggingSession",
"org.jbpm.db.SchedulerSession",
"org.jbpm.db.TaskMgmtSession",
"org.jbpm.db.compatibility.JbpmSchemaUpdate",
+ "org.jbpm.graph.action.ActionTypes",
"org.jbpm.graph.exe.ExecutionContext",
+ "org.jbpm.graph.node.InterleaveStart$DefaultInterleaver",
+ "org.jbpm.graph.node.NodeTypes",
+ "org.jbpm.graph.node.ProcessFactory",
"org.jbpm.instantiation.BeanInstantiator",
"org.jbpm.instantiation.ConfigurationPropertyInstantiator",
"org.jbpm.instantiation.ConstructorInstantiator",
@@ -57,31 +62,17 @@
"org.jbpm.instantiation.FieldInstantiator",
"org.jbpm.instantiation.ProcessClassLoader",
"org.jbpm.instantiation.XmlInstantiator",
- "org.jbpm.JbpmConfiguration",
- "org.jbpm.jmx.JbpmService",
"org.jbpm.job.executor.JobExecutorThread",
"org.jbpm.job.executor.LockMonitorThread",
"org.jbpm.jpdl.convert.Converter",
"org.jbpm.jpdl.convert.Converter$1",
- "org.jbpm.graph.action.ActionTypes",
- "org.jbpm.graph.node.Fork$ForkedToken",
- "org.jbpm.graph.node.InterleaveStart$DefaultInterleaver",
- "org.jbpm.graph.node.NodeTypes",
- "org.jbpm.graph.node.ProcessFactory",
+ "org.jbpm.jpdl.el.",
"org.jbpm.jpdl.par.FileArchiveParser",
"org.jbpm.jpdl.par.JpdlArchiveParser",
"org.jbpm.jpdl.par.ProcessArchive",
- "org.jbpm.jpdl.par.ProcessArchiveDeployer",
- "org.jbpm.jpdl.par.ProcessArchiveDeployerTask",
"org.jbpm.jpdl.xml.JpdlXmlReader",
"org.jbpm.jpdl.xml.JpdlXmlWriter",
- "org.jbpm.jpdl.el",
- "org.jbpm.scheduler.impl.Scheduler",
- "org.jbpm.scheduler.impl.Scheduler$HistoryListener",
- "org.jbpm.scheduler.impl.SchedulerMain$1",
- "org.jbpm.scheduler.impl.SchedulerMain$LogListener",
- "org.jbpm.scheduler.impl.SchedulerMain",
- "org.jbpm.scheduler.impl.SchedulerThread",
+ "org.jbpm.jsf.",
"org.jbpm.security.authenticator.JBossAuthenticator",
"org.jbpm.security.authenticator.JbpmDefaultAuthenticator",
"org.jbpm.security.authenticator.SubjectAuthenticator",
@@ -90,22 +81,11 @@
"org.jbpm.security.authorizer.JbpmIdentityAuthorizer",
"org.jbpm.security.authorizer.RolesAuthorizer",
"org.jbpm.security.filter.JbpmAuthenticationFilter",
- "org.jbpm.command.service.CommandServiceImpl",
- "org.jbpm.msg.jms.JmsCommandFactory",
- "org.jbpm.msg.jms.JmsMessageConstants",
- "org.jbpm.msg.jms.JmsMessageUtils",
- "org.jbpm.bpel.ant.DBSchemaTask",
- "org.jbpm.bpel.ant.ServiceGeneratorTask",
- "org.jbpm.bpel.ant.DeployProcessTask",
- "org.jbpm.bpel.",
"org.jbpm.sim.",
- "org.jbpm.jsf.",
"org.jbpm.util.Clock",
"org.jbpm.util.CustomLoaderObjectInputStream",
"org.jbpm.web.JobExecutorLauncher",
- "org.jbpm.web.JbpmConfigurationCloser",
- "org.jbpm.JbpmContextTestHelper",
- "org.jbpm.EventCallback$1"
+ "org.jbpm.web.JbpmConfigurationCloser"
};
public void testForNonSerializableClasses() {
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/instantiation/ConfigurableClassloadersTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/instantiation/ConfigurableClassloadersTest.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/instantiation/ConfigurableClassloadersTest.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -23,7 +23,6 @@
import org.jbpm.AbstractJbpmTestCase;
import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmConfigurationTestHelper;
import org.jbpm.JbpmContext;
import org.jbpm.graph.def.ProcessDefinition;
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -21,11 +21,11 @@
*/
package org.jbpm.jbpm1072;
-import org.jbpm.EventCallback;
import org.jbpm.JbpmConfiguration;
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.def.Event;
+import org.jbpm.graph.def.EventCallback;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.ProcessInstance;
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1135/JBPM1135Test.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1135/JBPM1135Test.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1135/JBPM1135Test.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -21,9 +21,9 @@
*/
package org.jbpm.jbpm1135;
-import org.jbpm.EventCallback;
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.Event;
+import org.jbpm.graph.def.EventCallback;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1452/JBPM1452Test.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1452/JBPM1452Test.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1452/JBPM1452Test.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -22,6 +22,7 @@
package org.jbpm.jbpm1452;
import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmException;
import org.jbpm.configuration.ObjectFactory;
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.ProcessDefinition;
@@ -78,7 +79,7 @@
newTransaction();
processInstance.end();
}
- catch (RuntimeException e) {
+ catch (JbpmException e) {
jbpmContext.setRollbackOnly();
fail("could not end process instance in absence of job executor: " + e);
}
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1755/JBPM1755Test.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1755/JBPM1755Test.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1755/JBPM1755Test.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -3,9 +3,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
-import org.jbpm.EventCallback;
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.Event;
+import org.jbpm.graph.def.EventCallback;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.node.Join;
Modified: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/AbstractEnterpriseTestCase.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/AbstractEnterpriseTestCase.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/AbstractEnterpriseTestCase.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -37,7 +37,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.cfg.Environment;
-import org.jbpm.EventCallback;
import org.jbpm.JbpmContext;
import org.jbpm.command.Command;
import org.jbpm.command.CommandService;
@@ -47,6 +46,7 @@
import org.jbpm.command.SignalCommand;
import org.jbpm.command.StartProcessInstanceCommand;
import org.jbpm.ejb.LocalCommandServiceHome;
+import org.jbpm.graph.def.EventCallback;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.persistence.db.DbPersistenceServiceFactory;
Modified: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -26,11 +26,11 @@
import junit.framework.Test;
import org.jboss.bpm.api.test.IntegrationTestSetup;
-import org.jbpm.EventCallback;
import org.jbpm.JbpmContext;
import org.jbpm.command.Command;
import org.jbpm.enterprise.AbstractEnterpriseTestCase;
import org.jbpm.graph.def.Event;
+import org.jbpm.graph.def.EventCallback;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.jbpm.scheduler.ejbtimer.EntitySchedulerService;
Modified: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/jms/JmsMessageTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/jms/JmsMessageTest.java 2009-02-19 00:28:36 UTC (rev 3931)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/jms/JmsMessageTest.java 2009-02-19 00:36:21 UTC (rev 3932)
@@ -24,9 +24,9 @@
import junit.framework.Test;
import org.jboss.bpm.api.test.IntegrationTestSetup;
-import org.jbpm.EventCallback;
import org.jbpm.enterprise.AbstractEnterpriseTestCase;
import org.jbpm.graph.def.Event;
+import org.jbpm.graph.def.EventCallback;
import org.jbpm.msg.jms.JmsMessageService;
/**
17 years, 2 months
JBoss JBPM SVN: r3931 - in jbpm3/trunk/modules/core: src/main/java/org/jbpm/db and 1 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-02-18 19:28:36 -0500 (Wed, 18 Feb 2009)
New Revision: 3931
Added:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JbpmSchemaDbTest.java
Removed:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JbpmSchemaDbTest.java
Modified:
jbpm3/trunk/modules/core/pom.xml
jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JbpmSchema.java
Log:
JBPM-1810: fix clean, drop, create schema with JbpmSchema
Modified: jbpm3/trunk/modules/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/core/pom.xml 2009-02-18 17:19:18 UTC (rev 3930)
+++ jbpm3/trunk/modules/core/pom.xml 2009-02-19 00:28:36 UTC (rev 3931)
@@ -250,12 +250,6 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <!-- [JBPM-1810] Fix clean, drop, create schema with JbpmSchema -->
- <exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude>
- </excludes>
- </configuration>
</plugin>
</plugins>
</build>
@@ -277,12 +271,6 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <!-- [JBPM-1810] Fix clean, drop, create schema with JbpmSchema -->
- <exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude>
- </excludes>
- </configuration>
</plugin>
</plugins>
</build>
@@ -304,14 +292,6 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <!-- [JBPM-1166] SEAM timer transaction integration -->
- <exclude>org/jbpm/seam/JobExecutorCustomizationTest.java</exclude>
- <!-- [JBPM-1810] Fix clean, drop, create schema with JbpmSchema -->
- <exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude>
- </excludes>
- </configuration>
</plugin>
</plugins>
</build>
@@ -333,12 +313,6 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <!-- [JBPM-1810] Fix clean, drop, create schema with JbpmSchema -->
- <exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude>
- </excludes>
- </configuration>
</plugin>
</plugins>
</build>
@@ -360,12 +334,6 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <!-- [JBPM-1810] Fix clean, drop, create schema with JbpmSchema -->
- <exclude>org/jbpm/db/JbpmSchemaDbTest.java</exclude>
- </excludes>
- </configuration>
</plugin>
</plugins>
</build>
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JbpmSchema.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JbpmSchema.java 2009-02-18 17:19:18 UTC (rev 3930)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JbpmSchema.java 2009-02-19 00:28:36 UTC (rev 3931)
@@ -27,17 +27,19 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
-import java.io.Serializable;
import java.sql.Connection;
+import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -53,10 +55,8 @@
/**
* utilities for the jBPM database schema.
*/
-public class JbpmSchema implements Serializable {
+public class JbpmSchema {
- private static final long serialVersionUID = 1L;
-
final Configuration configuration;
final Settings settings;
@@ -82,33 +82,39 @@
return concat(getDropSql(), getCreateSql());
}
- public List<String> getTableNames() {
- List<String> tableNames = new ArrayList<String>();
+ public Set<String> getJbpmTables() {
+ Set<String> jbpmTables = new HashSet<String>();
for (Iterator<?> i = configuration.getTableMappings(); i.hasNext();) {
Table table = (Table) i.next();
if (table.isPhysicalTable()) {
- tableNames.add(table.getName());
+ jbpmTables.add(table.getName());
}
}
- return tableNames;
+ return jbpmTables;
}
- public List<String> getAvailableTableNames() {
+ public Set<String> getExistingTables() {
try {
createConnection();
- List<String> tableNames = new ArrayList<String>();
+ Set<String> existingTables = new HashSet<String>();
- ResultSet resultSet = connection.getMetaData().getTables(settings.getDefaultCatalogName(),
- settings.getDefaultSchemaName(), "JBPM_%", new String[] { "TABLE" });
+ DatabaseMetaData metaData = connection.getMetaData();
+ boolean storesLowerCaseIdentifiers = metaData.storesLowerCaseIdentifiers();
+ ResultSet resultSet = metaData.getTables(settings.getDefaultCatalogName(),
+ settings.getDefaultSchemaName(), null, new String[] { "TABLE" });
try {
while (resultSet.next()) {
- tableNames.add(resultSet.getString("TABLE_NAME"));
+ String tableName = resultSet.getString("TABLE_NAME");
+ if (storesLowerCaseIdentifiers) {
+ tableName = tableName.toUpperCase();
+ }
+ existingTables.add(tableName);
}
}
finally {
resultSet.close();
}
- return tableNames;
+ return existingTables;
}
catch (SQLException e) {
throw new JbpmException("could not get available table names", e);
@@ -123,7 +129,7 @@
try {
createConnection();
Statement statement = connection.createStatement();
- for (String tableName : getTableNames()) {
+ for (String tableName : getJbpmTables()) {
String sql = "SELECT COUNT(*) FROM " + tableName;
ResultSet resultSet = statement.executeQuery(sql);
if (!resultSet.next()) throw new JbpmException("empty result set: " + sql);
@@ -345,7 +351,6 @@
}
catch (SQLException e) {
exceptions.add(e);
- log.debug("unsuccessful: " + sql);
log.debug(e.getMessage());
}
}
Deleted: jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JbpmSchemaDbTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JbpmSchemaDbTest.java 2009-02-18 17:19:18 UTC (rev 3930)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JbpmSchemaDbTest.java 2009-02-19 00:28:36 UTC (rev 3931)
@@ -1,63 +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.db;
-
-import java.util.Map;
-
-import org.hibernate.cfg.Configuration;
-import org.jbpm.AbstractJbpmTestCase;
-
-/**
- * Test the JbpmSchema utility
- *
- * @author thomas.diesler(a)jboss.com
- * @since 06-Nov-2008
- */
-public class JbpmSchemaDbTest extends AbstractJbpmTestCase {
-
- JbpmSchema jbpmSchema;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- jbpmSchema = new JbpmSchema(new Configuration().configure());
- }
-
- public void testCreateSchema() {
- jbpmSchema.createSchema();
- assertEquals(28, jbpmSchema.getAvailableTableNames().size());
- }
-
- public void testDropSchema() {
- jbpmSchema.dropSchema();
- assertEquals(0, jbpmSchema.getAvailableTableNames().size());
- }
-
- public void testCleanSchema() {
- jbpmSchema.cleanSchema();
- Map<String, Long> rowsPerTable = jbpmSchema.getRowsPerTable();
- assertEquals(28, rowsPerTable.size());
- for (long rowCount : rowsPerTable.values()) {
- assertEquals(0, rowCount);
- }
- }
-}
Copied: jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JbpmSchemaDbTest.java (from rev 3909, jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JbpmSchemaDbTest.java)
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JbpmSchemaDbTest.java (rev 0)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JbpmSchemaDbTest.java 2009-02-19 00:28:36 UTC (rev 3931)
@@ -0,0 +1,70 @@
+/*
+ * 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.db;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.hibernate.cfg.Configuration;
+import org.jbpm.AbstractJbpmTestCase;
+
+/**
+ * Test the JbpmSchema utility
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 06-Nov-2008
+ */
+public class JbpmSchemaDbTest extends AbstractJbpmTestCase {
+
+ JbpmSchema jbpmSchema;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ jbpmSchema = new JbpmSchema(new Configuration().configure());
+ }
+
+ public void testCreateSchema() {
+ jbpmSchema.createSchema();
+ Set<String> existingTables = jbpmSchema.getExistingTables();
+ assert existingTables.containsAll(jbpmSchema.getJbpmTables()) : existingTables;
+ }
+
+ public void testDropSchema() {
+ jbpmSchema.dropSchema();
+ Set<String> existingTables = jbpmSchema.getExistingTables();
+ for (String jbpmTable : jbpmSchema.getJbpmTables()) {
+ assert !existingTables.contains(jbpmTable) : existingTables;
+ }
+ }
+
+ public void testCleanSchema() {
+ jbpmSchema.cleanSchema();
+ Map<String, Long> rowsPerTable = jbpmSchema.getRowsPerTable();
+ Set<String> existingTables = jbpmSchema.getExistingTables();
+ assert existingTables.containsAll(rowsPerTable.keySet()) : existingTables;
+
+ for (long rowCount : rowsPerTable.values()) {
+ assertEquals(0, rowCount);
+ }
+ }
+}
17 years, 2 months