[jbpm-commits] JBoss JBPM SVN: r2699 - in jbpm4/trunk/modules: log and 42 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Oct 31 06:21:24 EDT 2008
Author: tom.baeyens at jboss.com
Date: 2008-10-31 06:21:24 -0400 (Fri, 31 Oct 2008)
New Revision: 2699
Added:
jbpm4/trunk/modules/log/
jbpm4/trunk/modules/log/.classpath
jbpm4/trunk/modules/log/.project
jbpm4/trunk/modules/log/pom.xml
jbpm4/trunk/modules/log/src/
jbpm4/trunk/modules/log/src/main/
jbpm4/trunk/modules/log/src/main/java/
jbpm4/trunk/modules/log/src/main/java/org/
jbpm4/trunk/modules/log/src/main/java/org/jbpm/
jbpm4/trunk/modules/log/src/main/java/org/jbpm/log/
jbpm4/trunk/modules/log/target/
jbpm4/trunk/modules/log/target/classes/
jbpm4/trunk/modules/log/target/classes/org/
jbpm4/trunk/modules/log/target/classes/org/jbpm/
jbpm4/trunk/modules/log/target/classes/org/jbpm/log/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/PvmEnvironmentFactory.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/SpringEnvironmentFactory.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ProcessFactory.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/Db.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/DbTestCase.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentDbTestCase.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentFactoryTestCase.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentFactoryTestSetup.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentTestCase.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/JbpmTestCase.java
Removed:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/
Modified:
jbpm4/trunk/modules/manual/.project
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/ErrorTriggeredFileHandler.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Jdk14Log.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Jdk14LogFactory.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Log.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Log4jLog.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Log4jLogFactory.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/LogFactory.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/LogFormatter.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckVersion.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/BasicEnvironment.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironment.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/PvmNamingStrategy.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageUtil.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/AcquireJobsCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/DispatcherThread.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/GetNextDueDateCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobAddedNotification.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThreadPool.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/ExecuteNode.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TakeTransition.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/Interceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/HibernateSessionResource.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransaction.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultVariableTypeResolver.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/matcher/HibernateIdMatcher.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireDefinition.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/DeployerManagerBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateConfigurationBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/CollectionDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ContextTypeRefDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/EnvironmentTypeRefDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateConfigurationDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionFactoryDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/JobExecutorDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/FieldOperation.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/MethodInvokerListener.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/SubscribeOperation.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/BindingParser.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/WireParser.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/IncrementCounterWaitState.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/langext/AddressActivity.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/ExclusiveTestCommand.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailOnceTestCommand.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorIsolationDbTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestMessageCommand.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ConcurrentWiringTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/xml/DebugDomBuilderTest.java
Log:
unification api proposals
Added: jbpm4/trunk/modules/log/.classpath
===================================================================
--- jbpm4/trunk/modules/log/.classpath (rev 0)
+++ jbpm4/trunk/modules/log/.classpath 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: jbpm4/trunk/modules/log/.project
===================================================================
--- jbpm4/trunk/modules/log/.project (rev 0)
+++ jbpm4/trunk/modules/log/.project 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>log</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: jbpm4/trunk/modules/log/pom.xml
===================================================================
--- jbpm4/trunk/modules/log/pom.xml (rev 0)
+++ jbpm4/trunk/modules/log/pom.xml 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+<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>jBPM 4 - Log</name>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-log</artifactId>
+ <packaging>jar</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <!-- Dependencies -->
+ <dependencies>
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <plugins>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/log/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/manual/.project
===================================================================
--- jbpm4/trunk/modules/manual/.project 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/manual/.project 2008-10-31 10:21:24 UTC (rev 2699)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>pvm-manual</name>
+ <name>manual</name>
<comment></comment>
<projects>
</projects>
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log (from rev 2690, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log)
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/ErrorTriggeredFileHandler.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/ErrorTriggeredFileHandler.java 2008-10-31 09:09:52 UTC (rev 2690)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/ErrorTriggeredFileHandler.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -19,7 +19,7 @@
* 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.pvm.internal.log;
+package org.jbpm.log;
import java.io.IOException;
import java.util.logging.FileHandler;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Jdk14Log.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/Jdk14Log.java 2008-10-31 09:09:52 UTC (rev 2690)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Jdk14Log.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -19,12 +19,12 @@
* 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.pvm.internal.log;
+package org.jbpm.log;
import java.util.logging.Level;
import java.util.logging.Logger;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Jdk14LogFactory.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/Jdk14LogFactory.java 2008-10-31 09:09:52 UTC (rev 2690)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Jdk14LogFactory.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -19,7 +19,7 @@
* 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.pvm.internal.log;
+package org.jbpm.log;
import java.io.IOException;
import java.io.InputStream;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Log.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/Log.java 2008-10-31 09:09:52 UTC (rev 2690)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Log.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -19,7 +19,7 @@
* 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.pvm.internal.log;
+package org.jbpm.log;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Log4jLog.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/Log4jLog.java 2008-10-31 09:09:52 UTC (rev 2690)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Log4jLog.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -19,7 +19,7 @@
* 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.pvm.internal.log;
+package org.jbpm.log;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Log4jLogFactory.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/Log4jLogFactory.java 2008-10-31 09:09:52 UTC (rev 2690)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/Log4jLogFactory.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -19,7 +19,7 @@
* 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.pvm.internal.log;
+package org.jbpm.log;
import org.apache.log4j.LogManager;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/LogFactory.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/LogFactory.java 2008-10-31 09:09:52 UTC (rev 2690)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/LogFactory.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -19,7 +19,7 @@
* 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.pvm.internal.log;
+package org.jbpm.log;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/LogFormatter.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/log/LogFormatter.java 2008-10-31 09:09:52 UTC (rev 2690)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/log/LogFormatter.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -1,4 +1,4 @@
-package org.jbpm.pvm.internal.log;
+package org.jbpm.log;
import java.io.PrintWriter;
import java.io.StringWriter;
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/PvmEnvironmentFactory.java (from rev 2694, jbpm4/trunk/modules/api/src/main/java/org/jbpm/pvm/env/PvmEnvironmentFactory.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/PvmEnvironmentFactory.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/PvmEnvironmentFactory.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,188 @@
+/*
+ * 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.pvm.env;
+
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Set;
+
+import org.jbpm.log.Log;
+import org.jbpm.pvm.internal.env.PvmEnvironment;
+import org.jbpm.pvm.internal.env.PvmEnvironmentFactoryParser;
+import org.jbpm.pvm.internal.stream.FileStreamSource;
+import org.jbpm.pvm.internal.stream.InputStreamSource;
+import org.jbpm.pvm.internal.stream.ResourceStreamSource;
+import org.jbpm.pvm.internal.stream.StreamSource;
+import org.jbpm.pvm.internal.stream.StringStreamSource;
+import org.jbpm.pvm.internal.stream.UrlStreamSource;
+import org.jbpm.pvm.internal.wire.WireContext;
+import org.jbpm.pvm.internal.wire.WireDefinition;
+
+
+/**
+ * an environment factory that also is the environment-factory context.
+ *
+ * <p>This environment factory will produce environments with 2 contexts:
+ * the environment-factory context and the block context.
+ * </p>
+ *
+ * <p>An environment-factory context is build from two wire definitions: the environment-factory
+ * wire definition and the environment wire definition.
+ * </p>
+ *
+ * <p>The environment-factory context itself is build from the environment-factory wire definition.
+ * So all objects that are created in this context remain cached for the lifetime of
+ * this environment-factory context object.
+ * </p>
+ *
+ * <p>This environment-factory context is also a environment factory. The produced environments
+ * contain 2 contexts: the environment-factory context itself and a new environment context,
+ * build from the environment wire definition. For each created environment, a new
+ * environment context will be created from the same environment wire definition.
+ * Objects in the environment context will live for as long as the environment.
+ * </p>
+ * @author Tom Baeyens
+ */
+public class PvmEnvironmentFactory extends EnvironmentFactory implements Context {
+
+ private static final long serialVersionUID = 1L;
+ private static final Log log = Log.getLog(PvmEnvironmentFactory.class.getName());
+ protected static PvmEnvironmentFactoryParser pvmEnvironmentFactoryParser = new PvmEnvironmentFactoryParser();
+
+ protected WireContext environmentFactoryCtxWireContext = null;
+ protected WireDefinition environmentCtxWireDefinition = null;
+
+ public PvmEnvironmentFactory() {
+ }
+
+ public PvmEnvironmentFactory(String resource) {
+ this(resource, null);
+ }
+
+ public PvmEnvironmentFactory(String resource, ClassLoader classLoader) {
+ this(new ResourceStreamSource(resource, classLoader));
+ }
+
+ public PvmEnvironmentFactory(File file) {
+ this(new FileStreamSource(file));
+ }
+
+ public PvmEnvironmentFactory(URL url) {
+ this(new UrlStreamSource(url));
+ }
+
+ public PvmEnvironmentFactory(InputStream inputStream) {
+ this(new InputStreamSource(inputStream));
+ }
+
+ public static PvmEnvironmentFactory parseXmlString(String xmlString) {
+ return new PvmEnvironmentFactory(new StringStreamSource(xmlString));
+ }
+
+ PvmEnvironmentFactory(StreamSource streamSource) {
+ PvmEnvironmentFactoryParser.getInstance()
+ .createParse()
+ .setDocumentObject(this)
+ .setStreamSource(streamSource)
+ .execute()
+ .checkProblems("pvm environment configuration "+streamSource);
+ }
+
+ public Environment openEnvironment() {
+ PvmEnvironment environment = new PvmEnvironment(this);
+
+ log.debug("opening "+environment);
+
+ // set the classloader
+ ClassLoader classLoader = environmentFactoryCtxWireContext.getClassLoader();
+ if (classLoader!=null) {
+ environment.setClassLoader(classLoader);
+ }
+
+ // add the environment-factory context
+ environment.addContext(environmentFactoryCtxWireContext);
+
+ // add the environment block context
+ WireContext environmentContext = new WireContext(environmentCtxWireDefinition, Context.CONTEXTNAME_ENVIRONMENT, environment, true);
+ // add the environment block context to the environment
+ environment.addContext(environmentContext);
+
+ try {
+ // finish the creation of the environment wire context
+ environmentContext.create();
+
+ } catch (RuntimeException e) {
+ // On exception, pop environment
+ Environment.popEnvironment();
+ throw e;
+ }
+ // if all went well, return the created environment
+ return environment;
+ }
+
+ public void close() {
+ environmentFactoryCtxWireContext.fire(WireContext.EVENT_CLOSE, null);
+ }
+
+ // environment-factory context delegation methods ///////////////////////////////////
+
+ public Object get(String key) {
+ return environmentFactoryCtxWireContext.get(key);
+ }
+
+ public <T> T get(Class<T> type) {
+ return environmentFactoryCtxWireContext.get(type);
+ }
+
+ public String getName() {
+ return environmentFactoryCtxWireContext.getName();
+ }
+
+ public boolean has(String key) {
+ return environmentFactoryCtxWireContext.has(key);
+ }
+
+ public Set<String> keys() {
+ return environmentFactoryCtxWireContext.keys();
+ }
+
+ public Object set(String key, Object value) {
+ return environmentFactoryCtxWireContext.set(key, value);
+ }
+
+ // getters and setters //////////////////////////////////////////////////////
+
+ public void setEnvironmentCtxWireDefinition(WireDefinition blockWireDefinition) {
+ this.environmentCtxWireDefinition = blockWireDefinition;
+ }
+ public WireContext getEnvironmentFactoryCtxWireContext() {
+ return environmentFactoryCtxWireContext;
+ }
+ public void setEnvironmentFactoryCtxWireContext(WireContext applicationWireContext) {
+ this.environmentFactoryCtxWireContext = applicationWireContext;
+ }
+ public WireDefinition getEnvironmentCtxWireDefinition() {
+ return environmentCtxWireDefinition;
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/PvmEnvironmentFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/SpringEnvironmentFactory.java (from rev 2694, jbpm4/trunk/modules/api/src/main/java/org/jbpm/pvm/env/SpringEnvironmentFactory.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/SpringEnvironmentFactory.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/env/SpringEnvironmentFactory.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,97 @@
+/*
+ * 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.pvm.env;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jbpm.pvm.internal.spring.SpringEnvironment;
+import org.jbpm.pvm.internal.util.ReflectUtil;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+/** this environment factory will see only the singleton beans.
+ *
+ * The created {@link SpringEnvironment}s will see the prototype
+ * beans and it will cache them.
+ *
+ * @author Tom Baeyens
+ */
+public class SpringEnvironmentFactory extends EnvironmentFactory implements ApplicationContextAware {
+
+ // TODO pull up the common behaviour between this class and the SpringEnvironmentContext
+
+ private static final long serialVersionUID = 1L;
+
+ ApplicationContext applicationContext;
+
+ public SpringEnvironment openEnvironment() {
+ return new SpringEnvironment(this);
+ }
+
+ public boolean has(String key) {
+ return applicationContext.isSingleton(key);
+ }
+
+ public Object get(String key) {
+ if (has(key)) {
+ return applicationContext.getBean(key);
+ }
+ return null;
+ }
+
+ public <T> T get(Class<T> type) {
+ String name = ReflectUtil.getUnqualifiedClassName(type);
+ name = name.substring(0, 1).toLowerCase() + name.substring(1);
+ return (T) get(name);
+ }
+
+ public Set<String> keys() {
+ HashSet<String> keys = new HashSet<String>();
+ for (String key : applicationContext.getBeanDefinitionNames()) {
+ if (has(key)) {
+ keys.add(key);
+ }
+ }
+ return keys;
+ }
+
+ public ApplicationContext getApplicationContext() {
+ return applicationContext;
+ }
+
+ public void setApplicationContext(ApplicationContext applicationContext) {
+ this.applicationContext = applicationContext;
+ }
+
+
+ public void close() {
+ }
+
+ public String getName() {
+ return null;
+ }
+
+ public Object set(String key, Object value) {
+ return null;
+ }
+}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckVersion.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckVersion.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CheckVersion.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -22,10 +22,10 @@
package org.jbpm.pvm.internal.deploy;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.session.PvmDbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateId.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -22,8 +22,8 @@
package org.jbpm.pvm.internal.deploy;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.DeploymentImpl;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/CreateProcess.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -24,8 +24,8 @@
import org.jbpm.ProcessDefinition;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.DeploymentImpl;
-import org.jbpm.pvm.internal.log.Log;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/DeployerManager.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -28,8 +28,8 @@
import java.util.Map.Entry;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.DeploymentImpl;
-import org.jbpm.pvm.internal.log.Log;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/BasicEnvironment.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/BasicEnvironment.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/BasicEnvironment.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -26,9 +26,9 @@
import java.util.Map;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.log.Log;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironment.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironment.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironment.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -21,9 +21,9 @@
*/
package org.jbpm.pvm.internal.env;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.Closable;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -12,7 +12,7 @@
import org.hibernate.usertype.ParameterizedType;
import org.hibernate.usertype.UserType;
import org.jbpm.Execution;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/PvmNamingStrategy.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/PvmNamingStrategy.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/PvmNamingStrategy.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -23,7 +23,7 @@
import org.hibernate.cfg.ImprovedNamingStrategy;
import org.hibernate.util.StringHelper;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.util.ReflectUtil;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageSession.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageSession.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -27,7 +27,7 @@
import javax.jms.Session;
import org.jbpm.PvmException;
-import org.jbpm.pvm.internal.job.MessageImpl;
+import org.jbpm.job.Message;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.MessageSession;
@@ -56,7 +56,7 @@
// Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
- public void send(MessageImpl<?> message) {
+ public void send(Message message) {
try {
dbSession.save(message);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageUtil.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageUtil.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -29,7 +29,7 @@
import javax.jms.Queue;
import javax.jms.Topic;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
/** message printing and destination name extraction.
* @author Tom Baeyens, Jim Rigsbee
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -26,6 +26,7 @@
import org.jbpm.PvmException;
import org.jbpm.job.Timer;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cal.BusinessCalendar;
@@ -34,7 +35,6 @@
import org.jbpm.pvm.internal.jobexecutor.JobAddedNotification;
import org.jbpm.pvm.internal.jobexecutor.JobDbSession;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.Clock;
import org.jbpm.pvm.model.ObservableElement;
import org.jbpm.pvm.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/AcquireJobsCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/AcquireJobsCmd.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/AcquireJobsCmd.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -27,10 +27,11 @@
import java.util.Collection;
import java.util.Date;
import java.util.List;
+
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.JobImpl;
-import org.jbpm.pvm.internal.log.Log;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/DispatcherThread.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/DispatcherThread.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/DispatcherThread.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -24,9 +24,9 @@
import java.util.Collection;
import java.util.Date;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
-import org.jbpm.pvm.internal.log.Log;
/** this thread is responsible for acquiring jobs in the jobImpl that need to be
* executed and then let the JobExecutor dispatch the acquired ids to one of the
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -26,12 +26,12 @@
import org.hibernate.Session;
import org.jbpm.PvmException;
import org.jbpm.job.Job;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.job.JobImpl;
-import org.jbpm.pvm.internal.log.Log;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/GetNextDueDateCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/GetNextDueDateCmd.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/GetNextDueDateCmd.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -22,10 +22,11 @@
package org.jbpm.pvm.internal.jobexecutor;
import java.util.Date;
+
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.JobImpl;
-import org.jbpm.pvm.internal.log.Log;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobAddedNotification.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobAddedNotification.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobAddedNotification.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -23,7 +23,7 @@
import javax.transaction.Synchronization;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
/** listener that can be registered as a listener to the transaction
* to notify the jobImpl executor of added jobs so that the dispatcher
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -28,12 +28,12 @@
import org.hibernate.Session;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.job.JobImpl;
-import org.jbpm.pvm.internal.log.Log;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -31,9 +31,9 @@
import java.util.concurrent.BlockingQueue;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
-import org.jbpm.pvm.internal.log.Log;
/** manager for jobImpl execution threads and their configuration.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -22,10 +22,10 @@
package org.jbpm.pvm.internal.jobexecutor;
import org.jbpm.PvmException;
+import org.jbpm.job.Message;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
-import org.jbpm.pvm.internal.job.MessageImpl;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.MessageSession;
@@ -45,7 +45,7 @@
boolean isNotificationAdded;
- public void send(MessageImpl<?> message) {
+ public void send(Message message) {
log.debug("sending message "+ReflectUtil.getUnqualifiedClassName(message.getClass()));
dbSession.save(message);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -24,8 +24,8 @@
import java.util.Collection;
import java.util.concurrent.BlockingQueue;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.cmd.CommandService;
-import org.jbpm.pvm.internal.log.Log;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThreadPool.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThreadPool.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThreadPool.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -24,7 +24,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -15,9 +15,9 @@
import org.jbpm.PvmException;
import org.jbpm.job.Timer;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.job.TimerImpl;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.session.TimerSession;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -27,10 +27,10 @@
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.cmd.CommandService;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.op.MoveToChildNode;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.listener.EventListener;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -38,13 +38,13 @@
import org.jbpm.Execution;
import org.jbpm.PvmException;
import org.jbpm.job.Timer;
+import org.jbpm.log.Log;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.job.MessageImpl;
import org.jbpm.pvm.internal.job.TimerImpl;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.op.AtomicOperation;
import org.jbpm.pvm.internal.model.op.ExecuteNode;
import org.jbpm.pvm.internal.model.op.MoveToChildNode;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -28,10 +28,10 @@
import java.util.Map;
import org.jbpm.Execution;
+import org.jbpm.log.Log;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.client.ClientProcessInstance;
import org.jbpm.pvm.internal.lob.Blob;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.IoUtil;
import org.jbpm.pvm.model.OpenProcessDefinition;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -27,7 +27,7 @@
import java.util.List;
import java.util.Set;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.model.OpenProcessDefinition;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/ExecuteNode.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/ExecuteNode.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/ExecuteNode.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -21,9 +21,9 @@
*/
package org.jbpm.pvm.internal.model.op;
+import org.jbpm.log.Log;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.internal.job.MessageImpl;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.model.ExecutionImpl.Propagation;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -24,9 +24,9 @@
import java.util.Map;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.activity.ExternalActivity;
import org.jbpm.pvm.internal.job.MessageImpl;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.model.ExecutionImpl.Propagation;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TakeTransition.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TakeTransition.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TakeTransition.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -24,8 +24,8 @@
import java.util.ArrayList;
import java.util.List;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.job.MessageImpl;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.model.ObservableElementImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -22,10 +22,10 @@
package org.jbpm.pvm.internal.svc;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CommandService;
-import org.jbpm.pvm.internal.log.Log;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/Interceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/Interceptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/Interceptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.svc;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.cmd.CommandService;
-import org.jbpm.pvm.internal.log.Log;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -22,8 +22,8 @@
package org.jbpm.pvm.internal.svc;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.cmd.Command;
-import org.jbpm.pvm.internal.log.Log;
import org.hibernate.StaleStateException;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/HibernateSessionResource.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/HibernateSessionResource.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/HibernateSessionResource.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -22,7 +22,7 @@
package org.jbpm.pvm.internal.tx;
import org.hibernate.Session;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransaction.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransaction.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransaction.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -27,8 +27,8 @@
import javax.transaction.Synchronization;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Transaction;
-import org.jbpm.pvm.internal.log.Log;
/** simple 2 phase commit transaction.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -22,9 +22,9 @@
package org.jbpm.pvm.internal.tx;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.svc.Interceptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultVariableTypeResolver.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultVariableTypeResolver.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultVariableTypeResolver.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -25,7 +25,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/matcher/HibernateIdMatcher.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/matcher/HibernateIdMatcher.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/matcher/HibernateIdMatcher.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -24,8 +24,8 @@
import org.hibernate.SessionFactory;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.type.Type;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.type.Matcher;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -10,8 +10,8 @@
import java.util.List;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor;
public abstract class ReflectUtil {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -29,7 +29,7 @@
import java.util.StringTokenizer;
import org.jbpm.PvmException;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.xml.Parse;
import javax.xml.namespace.QName;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -29,12 +29,12 @@
import java.util.Map;
import java.util.Set;
+import org.jbpm.log.Log;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ProcessElementImpl;
import org.jbpm.pvm.internal.util.Closable;
import org.jbpm.pvm.internal.util.DefaultObservable;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireDefinition.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireDefinition.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireDefinition.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -27,7 +27,7 @@
import java.util.List;
import java.util.Map;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/DeployerManagerBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/DeployerManagerBinding.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/DeployerManagerBinding.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -26,8 +26,8 @@
import java.util.Enumeration;
import java.util.List;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.deploy.DeployerManager;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.stream.UrlStreamSource;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.util.XmlUtil;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateConfigurationBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateConfigurationBinding.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateConfigurationBinding.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -28,7 +28,7 @@
import java.util.List;
import org.hibernate.cfg.Configuration;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.stream.FileStreamSource;
import org.jbpm.pvm.internal.stream.ResourceStreamSource;
import org.jbpm.pvm.internal.stream.StreamSource;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/CollectionDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/CollectionDescriptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/CollectionDescriptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -8,7 +8,7 @@
import java.util.SortedMap;
import java.util.SortedSet;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ContextTypeRefDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ContextTypeRefDescriptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ContextTypeRefDescriptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.wire.descriptor;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.wire.WireContext;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/EnvironmentTypeRefDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/EnvironmentTypeRefDescriptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/EnvironmentTypeRefDescriptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.wire.descriptor;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.wire.WireContext;
import org.jbpm.pvm.internal.wire.WireException;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateConfigurationDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateConfigurationDescriptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateConfigurationDescriptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -31,7 +31,7 @@
import java.util.Properties;
import org.jbpm.PvmException;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.wire.WireContext;
import org.jbpm.pvm.internal.wire.WireDefinition;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -25,8 +25,8 @@
import org.hibernate.Session;
import org.hibernate.SessionFactory;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.tx.HibernateSessionResource;
import org.jbpm.pvm.internal.tx.StandardTransaction;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionFactoryDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionFactoryDescriptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionFactoryDescriptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.wire.descriptor;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.util.Listener;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/JobExecutorDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/JobExecutorDescriptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/JobExecutorDescriptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -14,8 +14,8 @@
package org.jbpm.pvm.internal.wire.descriptor;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.Listener;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -8,8 +8,8 @@
import java.util.List;
import org.jbpm.PvmException;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.ArrayUtil;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.wire.Descriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -1,7 +1,7 @@
package org.jbpm.pvm.internal.wire.operation;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Transaction;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.tx.StandardResource;
import org.jbpm.pvm.internal.tx.StandardTransaction;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/FieldOperation.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/FieldOperation.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/FieldOperation.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -2,7 +2,7 @@
import java.lang.reflect.Field;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/MethodInvokerListener.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/MethodInvokerListener.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/MethodInvokerListener.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -4,7 +4,7 @@
import java.lang.reflect.Method;
import java.util.List;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.util.Listener;
import org.jbpm.pvm.internal.util.Observable;
import org.jbpm.pvm.internal.util.ReflectUtil;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/SubscribeOperation.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/SubscribeOperation.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/operation/SubscribeOperation.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -4,9 +4,9 @@
import java.util.List;
import java.util.Set;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.util.FilterListener;
import org.jbpm.pvm.internal.util.Listener;
import org.jbpm.pvm.internal.util.Observable;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/BindingParser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/BindingParser.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/BindingParser.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -23,7 +23,7 @@
import java.util.List;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.xml.Binding;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/WireParser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/WireParser.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/xml/WireParser.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -5,7 +5,7 @@
import java.util.Enumeration;
import java.util.List;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.wire.Descriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Parser.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -28,7 +28,7 @@
import javax.xml.parsers.DocumentBuilderFactory;
import org.jbpm.PvmException;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.stream.StreamSource;
import org.jbpm.pvm.internal.util.UrlEntity;
import org.jbpm.pvm.internal.util.XmlUtil;
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ProcessFactory.java (from rev 2694, jbpm4/trunk/modules/api/src/main/java/org/jbpm/pvm/model/ProcessFactory.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ProcessFactory.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ProcessFactory.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,685 @@
+/*
+ * 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.pvm.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Stack;
+
+import org.jbpm.ProcessDefinition;
+import org.jbpm.PvmException;
+import org.jbpm.pvm.activity.Activity;
+import org.jbpm.pvm.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.model.CompositeElementImpl;
+import org.jbpm.pvm.internal.model.EventImpl;
+import org.jbpm.pvm.internal.model.EventListenerReference;
+import org.jbpm.pvm.internal.model.ExceptionHandlerImpl;
+import org.jbpm.pvm.internal.model.NodeImpl;
+import org.jbpm.pvm.internal.model.ObjectReference;
+import org.jbpm.pvm.internal.model.ObservableElementImpl;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+import org.jbpm.pvm.internal.model.ProcessElementImpl;
+import org.jbpm.pvm.internal.model.TimerDefinitionImpl;
+import org.jbpm.pvm.internal.model.TransitionImpl;
+import org.jbpm.pvm.internal.model.VariableDefinitionImpl;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor;
+import org.jbpm.pvm.internal.wire.descriptor.StringDescriptor;
+import org.jbpm.pvm.listener.EventListener;
+
+/** factory for process definitions.
+ *
+ * <p>Use this factory as a <a href="http://martinfowler.com/bliki/FluentInterface.html">fluent interface</a>
+ * for building a process definition. To use it in this way, start with instantiating a ProcessFactory object.
+ * Then a number of methods can be invoked concatenated with dots cause all the methods return
+ * the same process factory object. When done, end that sequence with
+ * {@link #done()} to get the constructed ProcessDefinition.
+ * </p>
+ *
+ * <p>The idea is that this results into a more compact and more readable
+ * code to build process definitions as opposed to including xml inline. For example :
+ * </p>
+ * <pre>
+ * ProcessDefinition processDefinition = ProcessFactory.build()
+ * .node().initial().behaviour(new WaitState())
+ * .transition("normal").to("a")
+ * .transition("shortcut").to("c")
+ * .node("a").behaviour(new WaitState())
+ * .transition().to("b")
+ * .node("b").behaviour(new WaitState())
+ * .transition().to("c")
+ * .node("c").behaviour(new WaitState())
+ * .done();
+ * </pre>
+ *
+ * <hr />
+ *
+ * <p>If more control is needed over the creation of the process definition
+ * objects, then consider using the concrete implementation classes from
+ * package {@link org.jbpm.pvm.internal.model} directly. The implementation code
+ * of this class might be a good guide to get you on your way.
+ * </p>
+ *
+ * @author Tom Baeyens
+ */
+public class ProcessFactory {
+
+ // static factory methods ///////////////////////////////////////////////////
+
+ protected ProcessDefinitionImpl processDefinition;
+ protected NodeImpl node;
+ protected TransitionImpl transition;
+ protected List<DestinationReference> destinationReferences;
+ protected ObservableElementImpl observableElement;
+ protected EventImpl event;
+ protected EventListenerReference eventListenerReference;
+ protected ExceptionHandlerImpl exceptionHandler;
+ protected CompositeElementImpl compositeElement;
+ protected CompositeElementImpl scope;
+ protected Stack<CompositeElementImpl> compositeElementStack;
+
+ /** start building a process definition without a name. */
+ protected ProcessFactory() {
+ this(null);
+ }
+
+ /** start building a process definition with the given name. */
+ protected ProcessFactory(String processName) {
+ this(processName, null);
+ }
+
+ /** start building a process definition with the given name. */
+ protected ProcessFactory(String processName, ProcessDefinitionImpl processDefinition) {
+ if (processDefinition!=null) {
+ this.processDefinition = processDefinition;
+ } else {
+ this.processDefinition = instantiateProcessDefinition();
+ }
+ this.processDefinition.setName(processName);
+ this.observableElement = this.processDefinition;
+ this.compositeElement = this.processDefinition;
+ this.scope = this.processDefinition;
+ }
+
+ /** starts building a process definition */
+ public static ProcessFactory build() {
+ return new ProcessFactory();
+ }
+
+ /** starts building a process definition */
+ public static ProcessFactory build(String processName) {
+ return new ProcessFactory(processName);
+ }
+
+ /** starts populating a given process definition */
+ public static ProcessFactory build(String processName, ProcessDefinitionImpl processDefinition) {
+ return new ProcessFactory(processName, processDefinition);
+ }
+
+ /** to be overwritten by specific process language factories */
+ protected ProcessDefinitionImpl instantiateProcessDefinition() {
+ return new ProcessDefinitionImpl();
+ }
+
+ /** marks the last created node as the initial node in the process. */
+ public ProcessFactory initial() {
+ if (node==null) {
+ throw new PvmException("no current node");
+ }
+ if (processDefinition.getInitial()!=null) {
+ throw new PvmException("duplicate initial node");
+ }
+ processDefinition.setInitial(node);
+ return this;
+ }
+
+ /** applies on a node and makes it create a local activity instance scope.
+ * This is automatically implied when {@link #variable(String) adding a variable}
+ * or {@link #timer() adding a timer} */
+ public ProcessFactory scope() {
+ if (node==null) {
+ throw new PvmException("no current node");
+ }
+ node.setLocalScope(true);
+ scope = node;
+ return this;
+ }
+
+ /** declares a local variable. {@link #scope()} is automatically implied. */
+ public ProcessFactory variable(String key) {
+ if (node!=null) {
+ scope();
+ }
+ VariableDefinitionImpl variableDefinition = compositeElement.createVariableDefinition();
+ variableDefinition.setKey(key);
+ return this;
+ }
+
+ /** declares a local variable. {@link #scope()} is automatically implied. */
+ public ProcessFactory variable(Descriptor sourceDescriptor) {
+ if (node!=null && scope==null) {
+ scope();
+ }
+ VariableDefinitionImpl variableDefinition = scope.createVariableDefinition();
+ variableDefinition.setKey(sourceDescriptor.getName());
+ variableDefinition.setSourceDescriptor(sourceDescriptor);
+ return this;
+ }
+
+ /** declares a local variable. {@link #scope()} is automatically implied. */
+ public ProcessFactory variable(String key, String initialValue) {
+ return variable(new StringDescriptor(key, initialValue));
+ }
+
+ /** declares a timer on the current node or process. {@link #scope()} is
+ * automatically implied. */
+ public ProcessFactory timer(String dueDateDescription, String signalName) {
+ return timer(dueDateDescription, null, signalName, null);
+ }
+
+ /** declares a timer on the current node or process. {@link #scope()} is
+ * automatically implied. */
+ public ProcessFactory timer(String dueDateDescription, String signalName, String repeat) {
+ return timer(dueDateDescription, null, signalName, repeat);
+ }
+
+ /** declares a timer on the current node or process. {@link #scope()} is
+ * automatically implied. */
+ public ProcessFactory timer(Date dueDate, String signalName) {
+ return timer(null, dueDate, signalName, null);
+ }
+
+ protected ProcessFactory timer(String dueDateDescription, Date dueDate,
+ String signalName, String repeat) {
+ if (node!=null && scope==null) {
+ scope();
+ }
+ TimerDefinitionImpl timerDefinition = scope.createTimerDefinition();
+ if (dueDate!=null) {
+ timerDefinition.setDueDate(dueDate);
+ } else {
+ timerDefinition.setDueDateDescription(dueDateDescription);
+ }
+ timerDefinition.setSignalName(signalName);
+ timerDefinition.setRepeat(repeat);
+ return this;
+ }
+
+ /** creates a node in the current parent.
+ * The current parent is either the process definition or a composite node
+ * in case method {@link #compositeNode(String)} was called previously. */
+ public ProcessFactory node() {
+ return node(null);
+ }
+
+ /** creates a named node.
+ * The current parent is either the process definition or a composite node
+ * in case method {@link #compositeNode(String)} was called previously. */
+ public ProcessFactory node(String nodeName) {
+ if (exceptionHandler!=null) {
+ exceptionHandler.setNodeName(nodeName);
+ } else {
+ node = compositeElement.createNode(nodeName);
+ scope = null;
+
+ observableElement = node;
+ event = null;
+ eventListenerReference = null;
+ transition = null;
+ exceptionHandler = null;
+ }
+ return this;
+ }
+
+ /** sets the behaviour on the current node.
+ * A current node is required. */
+ public ProcessFactory behaviour(Activity activity) {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (node==null) {
+ throw new PvmException("no current node");
+ }
+ node.setBehaviour(activity);
+ return this;
+ }
+
+ /** sets the behaviour on the current node.
+ * A current node is required. */
+ public ProcessFactory behaviour(Descriptor descriptor) {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (node==null) {
+ throw new PvmException("no current node");
+ }
+ node.setBehaviour(descriptor);
+ return this;
+ }
+
+ /** sets the behaviour on the current node.
+ * A current node is required. */
+ public ProcessFactory behaviour(Class<? extends Activity> activityClass) {
+ return behaviour(new ObjectDescriptor(activityClass));
+ }
+
+ /** sets the behaviour on the current node.
+ * A current node is required. */
+ public ProcessFactory behaviour(String expression) {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (node==null) {
+ throw new PvmException("no current node");
+ }
+ node.setBehaviour(expression);
+ return this;
+ }
+
+
+ /** sets the asyncExecute property on the current node.
+ * A current node is required. */
+ public ProcessFactory asyncExecute() {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (node==null) {
+ throw new PvmException("no current node");
+ }
+ node.setExecutionAsync(true);
+ return this;
+ }
+
+ /** sets the asyncLeave property on the current node.
+ * A current node is required. */
+ public ProcessFactory asyncLeave() {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (node==null) {
+ throw new PvmException("no current node");
+ }
+ node.setLeaveAsync(true);
+ return this;
+ }
+
+ /** sets the asyncSignal property on the current node.
+ * A current node is required. */
+ public ProcessFactory asyncSignal() {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (node==null) {
+ throw new PvmException("no current node");
+ }
+ node.setSignalAsync(true);
+ return this;
+ }
+
+ /** sets the property needsPrevious on the current node.
+ * A current node is required. */
+ public ProcessFactory needsPrevious() {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (node==null) {
+ throw new PvmException("no current node");
+ }
+ node.setPreviousNeeded(true);
+ return this;
+ }
+
+ /** starts a block in which nested nodes can be created.
+ * This block can be ended with {@link #compositeEnd()}.
+ * A current node is required. */
+ public ProcessFactory compositeNode() {
+ return compositeNode(null);
+ }
+
+ /** starts a block in which nested nodes can be created.
+ * This block can be ended with {@link #compositeEnd()}.
+ * A current node is required. */
+ public ProcessFactory compositeNode(String nodeName) {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+
+ if (compositeElementStack==null) {
+ compositeElementStack = new Stack<CompositeElementImpl>();
+ }
+
+ compositeElementStack.push(compositeElement);
+ node(nodeName);
+ compositeElement = node;
+
+ return this;
+ }
+
+ /** ends a block in which nested nodes are created.
+ * This method requires that a nested node block was started before
+ * with {@link #compositeNode(String)} */
+ public ProcessFactory compositeEnd() {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+
+ if (compositeElementStack==null) {
+ throw new PvmException("no composite node was started");
+ }
+
+ compositeElement = compositeElementStack.pop();
+
+ if (compositeElementStack.isEmpty()) {
+ compositeElementStack = null;
+ }
+
+ return this;
+ }
+
+ /** creates a transition on the current node.
+ * This method requires a current node */
+ public ProcessFactory transition() {
+ return transition(null);
+ }
+
+ /** creates a named transition on the current node.
+ * This method requires a current node */
+ public ProcessFactory transition(String transitionName) {
+ if (exceptionHandler!=null) {
+ exceptionHandler.setTransitionName(transitionName);
+ } else {
+ if (node==null) {
+ throw new PvmException("no current node");
+ }
+ transition = node.createOutgoingTransition(null, transitionName);
+ observableElement = transition;
+ event = null;
+ eventListenerReference = null;
+ exceptionHandler = null;
+ }
+ return this;
+ }
+
+ /** sets the takeAsync property on the current transition
+ * This method requires a current transition. */
+ public ProcessFactory asyncTake() {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (transition==null) {
+ throw new PvmException("no current transition");
+ }
+ transition.setTakeAsync(true);
+ return this;
+ }
+
+ /** sets the destination node on the current transition.
+ * This method requires a current transition. */
+ public ProcessFactory to(String destination) {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (transition==null) {
+ throw new PvmException("no current transition");
+ }
+ if (destinationReferences==null) {
+ destinationReferences = new ArrayList<DestinationReference>();
+ }
+ destinationReferences.add(new DestinationReference(transition, destination));
+ return this;
+ }
+
+ /** sets the wait condition on the current transition.
+ * This method requires a current transition. */
+ public ProcessFactory waitCondition(Condition condition) {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (transition==null) {
+ throw new PvmException("no current transition");
+ }
+ Descriptor conditionDescriptor= new ProvidedObjectDescriptor(condition);
+ transition.setWaitConditionDescriptor(conditionDescriptor);
+ return this;
+ }
+
+ /** sets the guard condition on the current transition.
+ * This method requires a current transition. */
+ public ProcessFactory guardCondition(Condition condition) {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (transition==null) {
+ throw new PvmException("no current transition");
+ }
+ Descriptor conditionDescriptor= new ProvidedObjectDescriptor(condition);
+ transition.setConditionDescriptor(conditionDescriptor);
+ return this;
+ }
+
+ /** creates the given event on the current process element.
+ * This method requires a process element. A process element is
+ * either a process definition or a node. This method doesn't need to be
+ * called for transitions. If you have exception handlers and listeners
+ * on an event, make sure that you put the invocations of
+ * {@link #exceptionHandler(Class)} first. */
+ public ProcessFactory event(String eventName) {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (observableElement==null) {
+ throw new PvmException("no current process element");
+ }
+ if (observableElement instanceof Transition) {
+ throw new PvmException("for actions on transitions, you don't need to call event");
+ }
+ event = observableElement.createEvent(eventName);
+ exceptionHandler = null;
+ return this;
+ }
+
+ /** creates an exception handler for the given exception class on the current process element;
+ * until the {@link #exceptionHandlerEnd()}. Subsequent invocations of
+ * {@link #listener(Activity) listeners} or {@link #transition() transitions} will
+ * have the created exception handler as a target.
+ *
+ * DONT'T FORGET TO CLOSE THE EXCEPTION HANDLER WITH exceptionHandlerEnd. */
+ public ProcessFactory exceptionHandler(Class<? extends Exception> exceptionClass) {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+
+ ProcessElementImpl processElement = null;
+ if (eventListenerReference!=null) {
+ processElement = eventListenerReference;
+ } else if (event!=null) {
+ processElement = event;
+ } else if (observableElement!=null) {
+ processElement = observableElement;
+ } else {
+ throw new PvmException("no current process element, event or action");
+ }
+
+ exceptionHandler = processElement.createExceptionHandler();
+
+ if (exceptionClass!=null) {
+ exceptionHandler.setExceptionClassName(exceptionClass.getName());
+ }
+
+ return this;
+ }
+
+ public ProcessFactory exceptionHandlerEnd() {
+ exceptionHandler = null;
+ return this;
+ }
+
+ public ProcessFactory transactional() {
+ if (exceptionHandler==null) {
+ throw new PvmException("transactional is a property of an exception handler");
+ }
+ exceptionHandler.setTransactional(true);
+ return this;
+ }
+
+ /** adds an action to the current event. The current event was either
+ * created by {@link #event(String)} or by a {@link #transition()}.
+ * Subsequent invocations of {@link #exceptionHandler(Class)} will
+ * be associated to this event listener. */
+ public ProcessFactory listener(Descriptor descriptor) {
+ if (exceptionHandler!=null) {
+ exceptionHandler.createEventListenerReference(descriptor);
+ } else {
+ getEvent().createEventListenerReference(descriptor);
+ }
+ return this;
+ }
+
+ /** adds an action to the current event. The current event was either
+ * created by {@link #event(String)} or by a {@link #transition()}.
+ * Subsequent invocations of {@link #exceptionHandler(Class)} will
+ * be associated to this event listener. */
+ public ProcessFactory listener(EventListener eventListener) {
+ if (exceptionHandler!=null) {
+ exceptionHandler.createEventListenerReference(eventListener);
+ } else {
+ eventListenerReference = getEvent().createEventListenerReference(eventListener);
+ }
+ return this;
+ }
+
+ /** adds an action to the current event. The current event was either
+ * created by {@link #event(String)} or by a {@link #transition()}.
+ * Subsequent invocations of {@link #exceptionHandler(Class)} will
+ * be associated to this event listener. */
+ public ProcessFactory listener(String expression) {
+ if (exceptionHandler!=null) {
+ exceptionHandler.createActivityReference(expression);
+ } else {
+ eventListenerReference = getEvent().createEventListenerReference(expression);
+ }
+ return this;
+ }
+
+ /** disables propagated events. This means that this action will only be executed
+ * if the event is fired on the actual process element of the event. The current
+ * action will not be executed if an event is fired on one of the children of the
+ * process element to which this event relates. */
+ public ProcessFactory propagationDisabled() {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (eventListenerReference==null) {
+ throw new PvmException("no current event action");
+ }
+ eventListenerReference.setPropagationEnabled(false);
+ return this;
+ }
+
+ private EventImpl getEvent() {
+ if ( (event==null)
+ && (observableElement instanceof TransitionImpl)
+ ) {
+ event = ((TransitionImpl)observableElement).createEvent();
+ return event;
+ }
+ if (event==null) {
+ throw new PvmException("no current event");
+ }
+ return event;
+ }
+
+ /** adds a string-valued configuration to the current process element */
+ public ProcessFactory property(String name, String stringValue) {
+ StringDescriptor stringDescriptor = new StringDescriptor();
+ stringDescriptor.setName(name);
+ stringDescriptor.setValue(stringValue);
+ property(stringDescriptor);
+ return this;
+ }
+
+ /** adds a configuration to the current process element */
+ public ProcessFactory property(Descriptor descriptor) {
+ if (exceptionHandler!=null) {
+ throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
+ }
+ if (observableElement==null) {
+ throw new PvmException("no current process element");
+ }
+ if (event!=null) {
+ event.addProperty(descriptor);
+ } else {
+ observableElement.addProperty(descriptor);
+ }
+ return this;
+ }
+
+ public class DestinationReference {
+ TransitionImpl transition;
+ String destinationName;
+ public DestinationReference(TransitionImpl transition, String destinationName) {
+ this.transition = transition;
+ this.destinationName = destinationName;
+ }
+ public void resolve() {
+ NodeImpl destination = (NodeImpl) processDefinition.findNode(destinationName);
+ if (destination==null) {
+ throw new PvmException("couldn't find destination node '"+destinationName+"' for transition "+transition);
+ }
+ destination.addIncomingTransition(transition);
+ transition.setDestination(destination);
+ }
+ }
+
+ /** extract the process definition from the factory. This should be
+ * the last method in the chain of subsequent invoked methods on this
+ * factory object. */
+ public ClientProcessDefinition done() {
+ resolveDestinations();
+ if (processDefinition.getInitial()==null) {
+ throw new PvmException("no initial node");
+ }
+ return processDefinition;
+ }
+
+ /** sets the {@link ProcessDefinition#getVersion() version} of the process definition explicitely */
+ public ProcessFactory version(int version) {
+ processDefinition.setVersion(version);
+ return this;
+ }
+
+ /** sets the {@link ProcessDefinition#getKey() key} of the process definition explicitely */
+ public ProcessFactory key(String key) {
+ processDefinition.setKey(key);
+ return this;
+ }
+
+ private void resolveDestinations() {
+ if (destinationReferences!=null) {
+ for (DestinationReference destinationReference : destinationReferences) {
+ destinationReference.resolve();
+ }
+ }
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/model/ProcessFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test
___________________________________________________________________
Name: svn:mergeinfo
+
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/Db.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/Db.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/Db.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.MySQLDialect;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.mapping.ForeignKey;
+import org.hibernate.mapping.Table;
+import org.jbpm.pvm.env.EnvironmentFactory;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class Db {
+
+ private static final String CLEAN_SQL_KEY = "cleanSql";
+
+ public static void clean(EnvironmentFactory environmentFactory) {
+ SessionFactory sessionFactory = environmentFactory.get(SessionFactory.class);
+ String[] cleanSql = (String[]) environmentFactory.get(CLEAN_SQL_KEY);
+
+ if (cleanSql == null) {
+ Configuration configuration = environmentFactory.get(Configuration.class);
+
+ SessionFactoryImplementor sessionFactoryImplementor = (SessionFactoryImplementor) sessionFactory;
+ Dialect dialect = sessionFactoryImplementor.getDialect();
+
+ // loop over all foreign key constraints
+ List<String> dropForeignKeysSql = new ArrayList<String>();
+ List<String> createForeignKeysSql = new ArrayList<String>();
+ Iterator<Table> iter = configuration.getTableMappings();
+ while (iter.hasNext()) {
+ Table table = (Table) iter.next();
+ if (table.isPhysicalTable()) {
+ String catalog = table.getCatalog();
+ String schema = table.getSchema();
+ Iterator<ForeignKey> subIter = table.getForeignKeyIterator();
+ while (subIter.hasNext()) {
+ ForeignKey fk = (ForeignKey) subIter.next();
+ if (fk.isPhysicalConstraint()) {
+ // collect the drop foreign key constraint sql
+ dropForeignKeysSql.add(fk.sqlDropString(dialect, catalog, schema));
+ // MySQLDialect creates an index for each foreign key.
+ // see
+ // http://opensource.atlassian.com/projects/hibernate/browse/HHH-2155
+ // This index should be dropped or an error will be thrown during
+ // the creation phase
+ if (dialect instanceof MySQLDialect) {
+ dropForeignKeysSql.add("alter table " + table.getName() + " drop key " + fk.getName());
+ }
+ // and collect the create foreign key constraint sql
+ createForeignKeysSql.add(fk.sqlCreateString(dialect, sessionFactoryImplementor, catalog, schema));
+ }
+ }
+ }
+ }
+
+ List<String> deleteSql = new ArrayList<String>();
+ iter = configuration.getTableMappings();
+ while (iter.hasNext()) {
+ Table table = (Table) iter.next();
+ if (table.isPhysicalTable()) {
+ deleteSql.add("delete from " + table.getName());
+ }
+ }
+
+ // glue
+ // - drop foreign key constraints
+ // - delete contents of all tables
+ // - create foreign key constraints
+ // together to form the clean script
+ List<String> cleanSqlList = new ArrayList<String>();
+ cleanSqlList.addAll(dropForeignKeysSql);
+ cleanSqlList.addAll(deleteSql);
+ cleanSqlList.addAll(createForeignKeysSql);
+
+ cleanSql = (String[]) cleanSqlList.toArray(new String[cleanSqlList.size()]);
+
+ environmentFactory.set(CLEAN_SQL_KEY, cleanSql);
+ }
+
+ Session session = sessionFactory.openSession();
+ try {
+ for (String query : cleanSql) {
+ session.createSQLQuery(query).executeUpdate();
+ }
+ } finally {
+ session.close();
+ }
+ }
+
+}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/DbTestCase.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/DbTestCase.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/DbTestCase.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test;
+
+import org.jbpm.ExecutionService;
+import org.jbpm.ManagementService;
+import org.jbpm.ProcessService;
+import org.jbpm.pvm.internal.cmd.CommandService;
+
+
+/** for tests that use persistence through a command service.
+ *
+ * The DB is cleaned inbetween tests. No environment is created.
+ *
+ * @author Tom Baeyens
+ */
+public abstract class DbTestCase extends EnvironmentFactoryTestCase {
+
+ protected CommandService commandService;
+ protected ProcessService processService;
+ protected ExecutionService executionService;
+ protected ManagementService managementService;
+
+ public DbTestCase() {
+ super();
+ }
+
+ public DbTestCase(String configResource) {
+ super(configResource);
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ if (isEnvironmentFactoryCached()) {
+ Db.clean(getEnvironmentFactory());
+ }
+
+ commandService = getEnvironmentFactory().get(CommandService.class);
+ processService = getEnvironmentFactory().get(ProcessService.class);
+ executionService = getEnvironmentFactory().get(ExecutionService.class);
+ managementService = getEnvironmentFactory().get(ManagementService.class);
+ }
+
+ public void tearDown() throws Exception {
+ commandService = null;
+ processService = null;
+ executionService = null;
+ managementService = null;
+ super.tearDown();
+ }
+}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentDbTestCase.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentDbTestCase.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentDbTestCase.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,154 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test;
+
+import java.lang.reflect.Field;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.jbpm.Execution;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+import org.jbpm.pvm.internal.util.ReflectUtil;
+import org.jbpm.pvm.model.OpenProcessDefinition;
+import org.jbpm.pvm.session.DbSession;
+import org.jbpm.pvm.session.PvmDbSession;
+
+
+/** for tests that use persistence inside environment blocks.
+ *
+ * An environment is opened in the setUp and closed in the tearDown.
+ * DB is cleaned inbetween tests. Extra convenience methods for usage
+ * inside an environment block are provided.
+ *
+ * @author Tom Baeyens
+ */
+public class EnvironmentDbTestCase extends EnvironmentTestCase {
+
+ Transaction transaction = null;
+
+ public EnvironmentDbTestCase() {
+ }
+
+ public EnvironmentDbTestCase(String configResource) {
+ super(configResource);
+ }
+
+ public void setUp() throws Exception {
+ if (isEnvironmentFactoryCached()) {
+ Db.clean(getEnvironmentFactory());
+ }
+ super.setUp();
+ beginTransaction();
+ }
+
+ public void tearDown() throws Exception {
+ commitTransaction();
+ super.tearDown();
+ }
+
+ void beginTransaction() {
+ Session session = environment.get(Session.class);
+ transaction = session.beginTransaction();
+ }
+
+ void commitTransaction() {
+ transaction.commit();
+ transaction = null;
+ }
+
+ void rollbackTransaction() {
+ transaction.rollback();
+ transaction = null;
+ }
+
+ public DbSession getDbSession() {
+ return environment.get(DbSession.class);
+ }
+
+ public void rollbackAndBeginNewTransaction() {
+ rollbackTransaction();
+ closeEnvironment();
+ openEnvironment();
+ beginTransaction();
+ }
+
+ public void newTransaction() {
+ try {
+ commitTransaction();
+ closeEnvironment();
+ } finally {
+ openEnvironment();
+ beginTransaction();
+ }
+ }
+
+ public void beginCacheTest() {
+ SessionFactory sessionFactory = environment.get(SessionFactory.class);
+ if (sessionFactory != null) {
+ log.debug("=================================================================");
+ log.debug("Beginning of the cache test, no more sql query should be performed before the end of the test");
+ log.debug("=================================================================");
+
+ sessionFactory.getStatistics().clear();
+ sessionFactory.getStatistics().setStatisticsEnabled(true);
+ }
+ }
+
+ public void endCacheTest() {
+ SessionFactory sessionFactory = environment.get(SessionFactory.class);
+ if (sessionFactory != null) {
+ assertEquals(0, sessionFactory.getStatistics().getEntityLoadCount());
+ assertEquals(0, sessionFactory.getStatistics().getCollectionLoadCount());
+ }
+ }
+
+ public ProcessDefinitionImpl reload(OpenProcessDefinition processDefinition) {
+ environment.get(PvmDbSession.class).save(processDefinition);
+ newTransaction();
+ return environment.get(PvmDbSession.class).get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ }
+
+ public <T> T reload(T object, Class<T> persistentClass) {
+ environment.get(DbSession.class).save(object);
+ newTransaction();
+
+ Long dbid = null;
+ try {
+ Field dbidField = ReflectUtil.getField(persistentClass, "dbid");
+ dbidField.setAccessible(true);
+ dbid = (Long) dbidField.get(object);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return environment.get(DbSession.class).get(persistentClass, dbid);
+ }
+
+ public ExecutionImpl reload(Execution execution) {
+ environment.get(PvmDbSession.class).save(execution);
+ newTransaction();
+ return environment.get(PvmDbSession.class).get(ExecutionImpl.class, execution.getDbid());
+ }
+
+}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentFactoryTestCase.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentFactoryTestCase.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentFactoryTestCase.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jbpm.PvmException;
+import org.jbpm.pvm.env.EnvironmentFactory;
+import org.jbpm.pvm.env.PvmEnvironmentFactory;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public abstract class EnvironmentFactoryTestCase extends JbpmTestCase {
+
+ String configResource;
+
+ static Map<String, EnvironmentFactory> environmentFactories = new HashMap<String, EnvironmentFactory>();
+
+ public EnvironmentFactoryTestCase() {
+ this("environment.cfg.xml");
+ }
+
+ public EnvironmentFactoryTestCase(String configResource) {
+ this.configResource = configResource;
+ }
+
+ public EnvironmentFactory getEnvironmentFactory() {
+ if (isEnvironmentFactoryCached()) {
+ return environmentFactories.get(configResource);
+ }
+ return createEnvironmentFactory();
+ }
+
+ boolean isEnvironmentFactoryCached() {
+ return environmentFactories.containsKey(configResource);
+ }
+
+ EnvironmentFactory createEnvironmentFactory() {
+ return createEnvironmentFactory(configResource);
+ }
+
+ static EnvironmentFactory createEnvironmentFactory(String configResource) {
+ try {
+ log.debug("creating environment factory for ["+configResource+"]");
+ EnvironmentFactory newEnvironmentFactory = new PvmEnvironmentFactory(configResource);
+ environmentFactories.put(configResource, newEnvironmentFactory);
+ return newEnvironmentFactory;
+ } catch (Exception e) {
+ throw new PvmException("Exception during creation of environment factory for "+configResource, e);
+ }
+ }
+
+ static void closeEnvironmentFactory(String configResource) {
+ EnvironmentFactory environmentFactory = environmentFactories.remove(configResource);
+ if (environmentFactory!=null) {
+ log.debug("closing environment factory for ["+configResource+"]");
+ environmentFactory.close();
+ }
+ }
+}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentFactoryTestSetup.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentFactoryTestSetup.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentFactoryTestSetup.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,63 @@
+/**
+ * Copyright (C) 2007 Bull S. A. S.
+ * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
+ * This library 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
+ * version 2.1 of the License.
+ * This library 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
+ * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301, USA.
+ **/
+package org.jbpm.test;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Guillaume Porcher
+ *
+ */
+public class EnvironmentFactoryTestSetup extends TestSetup
+{
+ private String configResource;
+
+ public EnvironmentFactoryTestSetup(Test test)
+ {
+ this(test, "environment.cfg.xml");
+ }
+
+ public EnvironmentFactoryTestSetup(Class<?> testClass)
+ {
+ this(new TestSuite(testClass), "environment.cfg.xml");
+ }
+
+ public EnvironmentFactoryTestSetup(Test test, String configResource)
+ {
+ super(test);
+ this.configResource = configResource;
+ }
+
+ public EnvironmentFactoryTestSetup(Class<?> testClass, String configResource)
+ {
+ super(new TestSuite(testClass));
+ this.configResource = configResource;
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ EnvironmentFactoryTestCase.createEnvironmentFactory(configResource);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ EnvironmentFactoryTestCase.closeEnvironmentFactory(configResource);
+ super.tearDown();
+ }
+}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentTestCase.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentTestCase.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/EnvironmentTestCase.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test;
+
+import org.jbpm.pvm.env.Environment;
+
+/**
+ * @author Tom Baeyens
+ */
+public abstract class EnvironmentTestCase extends EnvironmentFactoryTestCase {
+
+ protected Environment environment;
+
+ public EnvironmentTestCase() {
+ }
+
+ public EnvironmentTestCase(String configResource) {
+ super(configResource);
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ openEnvironment();
+ }
+
+ public void tearDown() throws Exception {
+ closeEnvironment();
+ super.tearDown();
+ }
+
+ void closeEnvironment() {
+ environment.close();
+ environment = null;
+ }
+
+ void openEnvironment() {
+ environment = getEnvironmentFactory().openEnvironment();
+ }
+}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/JbpmTestCase.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/JbpmTestCase.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/test/JbpmTestCase.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
+
+import org.jbpm.log.Jdk14LogFactory;
+import org.jbpm.log.Log;
+import org.jbpm.log.LogFormatter;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.env.EnvironmentFactory;
+import org.jbpm.pvm.env.PvmEnvironmentFactory;
+
+public abstract class JbpmTestCase extends TestCase {
+
+ static {
+ Jdk14LogFactory.initializeJdk14Logging();
+ }
+
+ static protected Log log = Log.getLog(JbpmTestCase.class.getName());
+
+ public void setUp() throws Exception {
+ assertNull(Environment.getCurrent());
+ LogFormatter.resetIndentation();
+ log.info("=== starting "+getName()+" =============================");
+ }
+
+ public void tearDown() throws Exception {
+ log.info("=== ending "+getName()+" =============================\n");
+ assertNull(Environment.getCurrent());
+ }
+
+ public void assertTextPresent(String expected, String value) {
+ if ( (value==null)
+ || (value.indexOf(expected)==-1)
+ ) {
+ throw new AssertionFailedError("expected presence of '"+expected+"' but was '"+value+"'");
+ }
+ }
+
+ public static Environment openEnvironment(String xmlString) {
+ EnvironmentFactory environmentFactory = PvmEnvironmentFactory.parseXmlString(xmlString);
+ return environmentFactory.openEnvironment();
+ }
+
+ protected void runTest() throws Throwable {
+ try {
+ super.runTest();
+ } catch (AssertionFailedError e) {
+ log.error("");
+ log.error("ASSERTION FAILURE: "+e.getMessage());
+ log.error("");
+ throw e;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ throw t;
+ }
+ }
+}
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/db/continuation/ContinuationTest.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -31,6 +31,7 @@
import junit.framework.Test;
import org.hibernate.Session;
+import org.jbpm.log.Log;
import org.jbpm.pvm.client.ClientExecution;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.env.Environment;
@@ -38,7 +39,6 @@
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.model.OpenProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.pvm.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/IncrementCounterWaitState.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/IncrementCounterWaitState.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/IncrementCounterWaitState.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -15,9 +15,9 @@
import java.util.Map;
+import org.jbpm.log.Log;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
-import org.jbpm.pvm.internal.log.Log;
/**
* @author Pascal Verdage
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/langext/AddressActivity.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/langext/AddressActivity.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/langext/AddressActivity.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -22,10 +22,10 @@
package org.jbpm.pvm.internal.db.langext;
+import org.jbpm.log.Log;
import org.jbpm.pvm.activity.Activity;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.log.Log;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/ExclusiveTestCommand.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/ExclusiveTestCommand.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/ExclusiveTestCommand.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -27,10 +27,10 @@
import java.util.Set;
import org.hibernate.Session;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.wire.descriptor.LongDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailOnceTestCommand.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailOnceTestCommand.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/FailOnceTestCommand.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -21,11 +21,11 @@
*/
package org.jbpm.pvm.internal.jobexecutor;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.job.MessageImpl;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.wire.descriptor.IntegerDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorIsolationDbTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorIsolationDbTest.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorIsolationDbTest.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -17,10 +17,10 @@
import java.util.List;
import org.jbpm.job.Message;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
import org.jbpm.pvm.session.MessageSession;
import org.jbpm.pvm.session.PvmDbSession;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -34,6 +34,7 @@
import org.hibernate.Session;
import org.jbpm.ProcessService;
import org.jbpm.job.Job;
+import org.jbpm.log.Log;
import org.jbpm.pvm.DeploymentImpl;
import org.jbpm.pvm.activity.ActivityExecution;
import org.jbpm.pvm.activity.ExternalActivity;
@@ -44,7 +45,6 @@
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.job.JobImpl;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.model.Comment;
import org.jbpm.pvm.model.ProcessFactory;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestMessageCommand.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestMessageCommand.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/TestMessageCommand.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -24,10 +24,10 @@
import java.util.List;
import java.util.Random;
+import org.jbpm.log.Log;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
-import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.wire.descriptor.IntegerDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
import org.jbpm.pvm.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ConcurrentWiringTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ConcurrentWiringTest.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ConcurrentWiringTest.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -24,7 +24,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.wire.WireContext;
/**
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/xml/DebugDomBuilderTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/xml/DebugDomBuilderTest.java 2008-10-31 10:19:49 UTC (rev 2698)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/xml/DebugDomBuilderTest.java 2008-10-31 10:21:24 UTC (rev 2699)
@@ -24,7 +24,7 @@
import java.io.InputStream;
import java.util.List;
-import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.log.Log;
import org.jbpm.pvm.internal.util.DebugDomParser;
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.test.JbpmTestCase;
More information about the jbpm-commits
mailing list