You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by js...@apache.org on 2006/05/16 16:49:38 UTC

svn commit: r406961 - in /incubator/servicemix/trunk/servicemix-beanflow: ./ src/main/java/org/apache/servicemix/beanflow/ src/main/java/org/apache/servicemix/beanflow/support/ src/test/java/org/apache/servicemix/beanflow/

Author: jstrachan
Date: Tue May 16 07:49:36 2006
New Revision: 406961

URL: http://svn.apache.org/viewcvs?rev=406961&view=rev
Log:
removed unnecessary dependencies, tidied up the code and removed System.out calls

Modified:
    incubator/servicemix/trunk/servicemix-beanflow/pom.xml
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/AbstractActivity.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/Activity.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ActivityHelper.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinAll.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinQuorum.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinSupport.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ParallelActivity.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ProxyActivity.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/State.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/Workflow.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/CallablesFactory.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/FindCallableMethods.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/Interpreter.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/Notifier.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/ReflectionInterpreter.java
    incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/SynchronousNotifier.java
    incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/CustomJoinConditionTest.java
    incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ExampleParallelBean.java
    incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ExampleWorkflow.java
    incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/FlowTestSupport.java
    incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/JoinAllTest.java
    incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/JoinQuorumTest.java
    incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ParallelActivityTest.java
    incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/TimeoutFlowTest.java
    incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/WorkflowTest.java

Modified: incubator/servicemix/trunk/servicemix-beanflow/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/pom.xml?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/pom.xml (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/pom.xml Tue May 16 07:49:36 2006
@@ -16,32 +16,28 @@
     limitations under the License.
 -->
 <!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 déc. 2005) $ -->
-<project
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
 
   <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.servicemix</groupId>
-    <artifactId>servicemix</artifactId>
-    <version>3.0-SNAPSHOT</version>
-  </parent>
-
+  <groupId>org.apache.servicemix</groupId>
   <artifactId>servicemix-beanflow</artifactId>
+  <version>3.0-SNAPSHOT</version>
+
   <name>ServiceMix :: BeanFlow</name>
   <description>BeanFlow library for making asynchronous flows of beans</description>
-  
-  <dependencies>
 
+  <dependencies>
     <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>servicemix-common</artifactId>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.0.4</version>
     </dependency>
     <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>servicemix-core</artifactId>
-      <scope>provided</scope>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
     </dependency>
   </dependencies>
 
@@ -54,23 +50,6 @@
           <target>1.5</target>
         </configuration>
       </plugin>
-
-    <!-- 
-      <plugin>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>maven-xbean-plugin</artifactId>
-        <executions>
-          <execution>
-            <configuration>
-              <namespace>http://servicemix.apache.org/beanflow/1.0</namespace>
-            </configuration>
-            <goals>
-              <goal>mapping</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-       -->
     </plugins>
   </build>
 </project>

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/AbstractActivity.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/AbstractActivity.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/AbstractActivity.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/AbstractActivity.java Tue May 16 07:49:36 2006
@@ -21,10 +21,11 @@
 import java.util.Iterator;
 
 /**
- * A useful base class which allows simple bean activities to be written easily. When
- * this activity is started it will listen to all the state values which can be
- * found by the introspector (such as all the fields by default) calling the
- * {@link run} method when the state changes so that the activity can be evaluted.
+ * A useful base class which allows simple bean activities to be written easily.
+ * When this activity is started it will listen to all the state values which
+ * can be found by the introspector (such as all the fields by default) calling
+ * the {@link run} method when the state changes so that the activity can be
+ * evaluted.
  * 
  * @version $Revision: $
  */
@@ -67,7 +68,8 @@
     }
 
     /**
-     * Stops the activity with a failed state with the given reason and exception.
+     * Stops the activity with a failed state with the given reason and
+     * exception.
      */
     public void fail(String message, Throwable e) {
         fail(message);

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/Activity.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/Activity.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/Activity.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/Activity.java Tue May 16 07:49:36 2006
@@ -19,13 +19,14 @@
 import java.util.Timer;
 
 /**
- * Represents an activity (step) in a workflow written typically using regular Java code.
- * An activity typically monitors various {@link State} objects and takes action when things change.
- * Activities are designed to be thread safe and are intended for use in highly concurrent
- * or distributed applications so that the state can be changed from any thread.
- * <br>
- * The Processing of notifications of state changes should generally be quick; if lots of work
- * is required when some state changes it is advisable to use a thread pool to do the work.
+ * Represents an activity (step) in a workflow written typically using regular
+ * Java code. An activity typically monitors various {@link State} objects and
+ * takes action when things change. Activities are designed to be thread safe
+ * and are intended for use in highly concurrent or distributed applications so
+ * that the state can be changed from any thread. <br>
+ * The Processing of notifications of state changes should generally be quick;
+ * if lots of work is required when some state changes it is advisable to use a
+ * thread pool to do the work.
  * 
  * @version $Revision: $
  */
@@ -41,17 +42,18 @@
     };
 
     /**
-     * Starts the activity. Once it is started it can take an arbitrary amount of time to complete.
-     * The execution of an activity is usually asynchronous in nature (though its not mandatory)
+     * Starts the activity. Once it is started it can take an arbitrary amount
+     * of time to complete. The execution of an activity is usually asynchronous
+     * in nature (though its not mandatory)
      */
     public void start();
 
     /**
      * For activities that support timeout based operation this helper method
-     * starts the activity and registers the timeout 
+     * starts the activity and registers the timeout
      */
     public void startWithTimeout(Timer timer, long timeout);
-    
+
     /**
      * Stops the activity, setting the status to {@link Stopped}
      */
@@ -77,7 +79,7 @@
      * Returns true if the activity has failed to complete succesfully
      */
     public boolean isFailed();
-    
+
     /**
      * If this activity has failed then return a reason for the failure
      */

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ActivityHelper.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ActivityHelper.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ActivityHelper.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ActivityHelper.java Tue May 16 07:49:36 2006
@@ -23,7 +23,7 @@
  * @version $Revision: $
  */
 public class ActivityHelper {
-    
+
     /**
      * Ensures that all the activities are started
      */
@@ -32,7 +32,7 @@
             activity.start();
         }
     }
-    
+
     /**
      * Ensures that all the activities are started
      */

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinAll.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinAll.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinAll.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinAll.java Tue May 16 07:49:36 2006
@@ -44,10 +44,10 @@
     }
 
     /**
-     * If fail fast mode is enabled then this activity fails as soon as a child activity
-     * fails. The default is to wait for all the child activities to complete
-     * irrespective of whether they stop succesfully or fail before completing
-     * this activity
+     * If fail fast mode is enabled then this activity fails as soon as a child
+     * activity fails. The default is to wait for all the child activities to
+     * complete irrespective of whether they stop succesfully or fail before
+     * completing this activity
      */
     public void setFailFast(boolean failFast) {
         this.failFast = failFast;

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinQuorum.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinQuorum.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinQuorum.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinQuorum.java Tue May 16 07:49:36 2006
@@ -19,7 +19,8 @@
 
 /**
  * A activity which completes when quorum of the child activities are completed
- * successfully (or there are too many child activities failed to achieve quorum).
+ * successfully (or there are too many child activities failed to achieve
+ * quorum).
  * 
  * @version $Revision: $
  */

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinSupport.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinSupport.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinSupport.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/JoinSupport.java Tue May 16 07:49:36 2006
@@ -19,7 +19,8 @@
 import java.util.List;
 
 /**
- * A useful base class for a activity which joins on the success of a collection of child activities.
+ * A useful base class for a activity which joins on the success of a collection
+ * of child activities.
  * 
  * @version $Revision: $
  */
@@ -80,7 +81,7 @@
     @Override
     protected void doStart() {
         super.doStart();
-        
+
         // lets make sure that the child activities are started properly
         synchronized (children) {
             for (Activity child : children) {

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ParallelActivity.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ParallelActivity.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ParallelActivity.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ParallelActivity.java Tue May 16 07:49:36 2006
@@ -18,7 +18,9 @@
 import org.apache.servicemix.beanflow.support.CallablesFactory;
 import org.apache.servicemix.beanflow.support.FindCallableMethods;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Timer;
 import java.util.concurrent.Callable;
 import java.util.concurrent.Executor;
 import java.util.concurrent.Future;
@@ -35,16 +37,17 @@
     private AtomicBoolean started = new AtomicBoolean();
 
     /**
-     * A helper method to create a new {@link ParallelActivity} which invokes a number of methods
-     * on a POJO in parallel and then joins on them all completing
+     * A helper method to create a new {@link ParallelActivity} which invokes a
+     * number of methods on a POJO in parallel and then joins on them all
+     * completing
      */
     public static ParallelActivity newParallelMethodActivity(Executor executor, Object bean) {
         return newParallelMethodActivity(new JoinAll(), executor, bean);
     }
 
     /**
-     * A helper method to create a new {@link ParallelActivity} which invokes a number of methods
-     * on a POJO in parallel and then performs a custom join
+     * A helper method to create a new {@link ParallelActivity} which invokes a
+     * number of methods on a POJO in parallel and then performs a custom join
      */
     @SuppressWarnings("unchecked")
     public static ParallelActivity newParallelMethodActivity(JoinSupport join, Executor executor, Object bean) {

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ProxyActivity.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ProxyActivity.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ProxyActivity.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/ProxyActivity.java Tue May 16 07:49:36 2006
@@ -15,8 +15,6 @@
  */
 package org.apache.servicemix.beanflow;
 
-import org.apache.servicemix.beanflow.Activity.Transitions;
-
 import java.util.Timer;
 
 /**
@@ -40,7 +38,7 @@
     public String getFailedReason() {
         return getProxy().getFailedReason();
     }
-    
+
     public Throwable getFailedException() {
         return getProxy().getFailedException();
     }

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/State.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/State.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/State.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/State.java Tue May 16 07:49:36 2006
@@ -18,8 +18,8 @@
 
 /**
  * Represents a piece of state which can be accessed in a multi threaded way
- * rather like {@link java.util.concurrent.atomic.AtomicReference} but which also 
- * supports the use of listeners to be notified when the state changes.
+ * rather like {@link java.util.concurrent.atomic.AtomicReference} but which
+ * also supports the use of listeners to be notified when the state changes.
  * 
  * @version $Revision: $
  */

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/Workflow.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/Workflow.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/Workflow.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/Workflow.java Tue May 16 07:49:36 2006
@@ -26,8 +26,8 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
- * An activity which implements a more traditional workflow model where each method
- * represents a transition.
+ * An activity which implements a more traditional workflow model where each
+ * method represents a transition.
  * 
  * @version $Revision: $
  */
@@ -97,7 +97,7 @@
             activity.start();
         }
     }
-    
+
     /**
      * Forks one or more child activities
      */
@@ -109,8 +109,8 @@
     }
 
     /**
-     * Creates a join such that when all of the activities are completed the given
-     * step will be executed
+     * Creates a join such that when all of the activities are completed the
+     * given step will be executed
      */
     public void joinAll(final String joinedStep, long timeout, Activity... activities) {
         JoinAll joinFlow = new JoinAll(activities);

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/CallablesFactory.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/CallablesFactory.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/CallablesFactory.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/CallablesFactory.java Tue May 16 07:49:36 2006
@@ -24,7 +24,7 @@
  * @version $Revision: $
  */
 public interface CallablesFactory<T> {
-    
+
     public List<Callable<T>> createCallables();
 
 }

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/FindCallableMethods.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/FindCallableMethods.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/FindCallableMethods.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/FindCallableMethods.java Tue May 16 07:49:36 2006
@@ -19,7 +19,9 @@
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 import java.util.concurrent.Callable;
 
 /**

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/Interpreter.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/Interpreter.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/Interpreter.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/Interpreter.java Tue May 16 07:49:36 2006
@@ -18,7 +18,7 @@
 import org.apache.servicemix.beanflow.Workflow;
 
 /**
- *
+ * 
  * @version $Revision: $
  */
 public interface Interpreter {

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/Notifier.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/Notifier.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/Notifier.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/Notifier.java Tue May 16 07:49:36 2006
@@ -21,13 +21,13 @@
  * @version $Revision: $
  */
 public interface Notifier extends Runnable {
-    
+
     /**
      * Adds a new listener
      */
     public void addRunnable(Runnable listener);
 
-    /** 
+    /**
      * removes a listener
      */
     public void removeRunnable(Runnable listener);

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/ReflectionInterpreter.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/ReflectionInterpreter.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/ReflectionInterpreter.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/ReflectionInterpreter.java Tue May 16 07:49:36 2006
@@ -20,7 +20,8 @@
 import java.lang.reflect.Method;
 
 /**
- * An interpreter strategy which uses reflection to map step names to method names.
+ * An interpreter strategy which uses reflection to map step names to method
+ * names.
  * 
  * @version $Revision: $
  */

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/SynchronousNotifier.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/SynchronousNotifier.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/SynchronousNotifier.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/main/java/org/apache/servicemix/beanflow/support/SynchronousNotifier.java Tue May 16 07:49:36 2006
@@ -19,8 +19,8 @@
 import java.util.List;
 
 /**
- * A default {@link Notifier} which just performs the notifications synchronously
- * as the state changes.
+ * A default {@link Notifier} which just performs the notifications
+ * synchronously as the state changes.
  * 
  * @version $Revision: $
  */

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/CustomJoinConditionTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/CustomJoinConditionTest.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/CustomJoinConditionTest.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/CustomJoinConditionTest.java Tue May 16 07:49:36 2006
@@ -16,10 +16,10 @@
 package org.apache.servicemix.beanflow;
 
 /**
- *
+ * 
  * @version $Revision: $
  */
-public class CustomJoinConditionTest extends FlowTestSupport  {
+public class CustomJoinConditionTest extends FlowTestSupport {
 
     public void testCustomJoinCondition() throws Exception {
         // START SNIPPET: join
@@ -32,17 +32,17 @@
         Activity activity = new JoinSupport(a, b, c) {
             @Override
             protected void onChildStateChange(int childCount, int stoppedCount, int failedCount) {
-                
+
                 if (a.isStopped() && (b.isStopped() || c.isStopped())) {
                     // lets stop the activity we're done
                     stop();
                 }
             }
         };
-        
+
         // lets start the activities
         activity.startWithTimeout(timer, timeout);
-        
+
         // now lets test things behave properly
         assertFlowStarted(activity);
 
@@ -52,7 +52,7 @@
         b.stop();
         assertFlowStopped(activity);
         // END SNIPPET: join
-        
+
         // lets check things are still fine when c completes
         c.stop();
         assertFlowStopped(activity);

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ExampleParallelBean.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ExampleParallelBean.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ExampleParallelBean.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ExampleParallelBean.java Tue May 16 07:49:36 2006
@@ -15,10 +15,10 @@
  */
 package org.apache.servicemix.beanflow;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.beanflow.annotations.Parallel;
 
-import java.util.*;
-import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
@@ -31,6 +31,7 @@
  */
 // START SNIPPET: workflow
 public class ExampleParallelBean {
+    private static final Log log = LogFactory.getLog(ExampleParallelBean.class);
 
     private CountDownLatch latch = new CountDownLatch(3);
 
@@ -40,19 +41,19 @@
 
     @Parallel
     public void methodOne() {
-        System.out.println("Called method one");
+        log.info("Called method one");
         latch.countDown();
     }
 
     @Parallel
     public void methodTwo() {
-        System.out.println("Called method two");
+        log.info("Called method two");
         latch.countDown();
     }
 
     @Parallel
     public void methodThree() {
-        System.out.println("Called method three");
+        log.info("Called method three");
         latch.countDown();
     }
 

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ExampleWorkflow.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ExampleWorkflow.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ExampleWorkflow.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ExampleWorkflow.java Tue May 16 07:49:36 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.servicemix.beanflow;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * An example workflow
  * 
@@ -22,6 +25,7 @@
  */
 // START SNIPPET: workflow
 public class ExampleWorkflow extends Workflow {
+    private static final Log log = LogFactory.getLog(ExampleWorkflow.class);
 
     private int loopCount;
     private long timeout = 500;
@@ -32,9 +36,9 @@
 
     // This is the first step of a workflow by default
     // but you can start at any point by passing in a parameter
-    // to the Workflow constructor 
+    // to the Workflow constructor
     public void startStep() {
-        // lets use an explicit goTo() to tell the workflow 
+        // lets use an explicit goTo() to tell the workflow
         // which step to go to next; though we can just return Strings
         goTo("loopStep");
     }
@@ -47,41 +51,41 @@
         // lets keep looping
         return "loopStep";
     }
-    
+
     public void waitForUserInputStep() {
-        // we are going to park here until a user 
+        // we are going to park here until a user
         // enters a valid email address
         // so lets park the workflow engine
     }
-    
+
     public String afterEnteredEmailStep() {
-        // we are going to park here until a user 
+        // we are going to park here until a user
         // enters a valid email address
-        System.out.println("User entered email address: " + userEmailAddress);
+        log.info("User entered email address: " + userEmailAddress);
         return "forkStep";
     }
-    
+
     public void forkStep() {
         // lets fork some child flows
         TimeoutActivity a = new TimeoutActivity();
         TimeoutActivity b = new TimeoutActivity();
         TimeoutActivity c = new TimeoutActivity();
-        
-        System.out.println("Forking off processes a, b, c");
+
+        log.info("Forking off processes a, b, c");
         fork(a, b, c);
-        
+
         // now lets add some joins
-        joinAll("aCompletedStep",timeout, a);
+        joinAll("aCompletedStep", timeout, a);
         joinAll("abcCompletedStep", timeout, a, b, c);
     }
-    
+
     public void aCompletedStep() {
-        System.out.println("child flow A completed!");
+        log.info("child flow A completed!");
     }
-    
+
     public String abcCompletedStep() {
-        System.out.println("child flows A, B and C completed!");
-        
+        log.info("child flows A, B and C completed!");
+
         // we are completely done now
         return "stop";
     }
@@ -91,8 +95,8 @@
     public void userEntered(String emailAddress) {
         if (emailAddress != null && emailAddress.indexOf("@") > 0) {
             this.userEmailAddress = emailAddress;
-            
-            System.out.println("Lets re-start the suspended workflow");
+
+            log.info("Lets re-start the suspended workflow");
             goTo("afterEnteredEmailStep");
         }
     }

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/FlowTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/FlowTestSupport.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/FlowTestSupport.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/FlowTestSupport.java Tue May 16 07:49:36 2006
@@ -15,12 +15,12 @@
  */
 package org.apache.servicemix.beanflow;
 
-import org.apache.commons.logging.*;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.beanflow.Activity.Transitions;
 
 import java.util.Timer;
 
-import junit.framework.Assert;
 import junit.framework.TestCase;
 
 /**

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/JoinAllTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/JoinAllTest.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/JoinAllTest.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/JoinAllTest.java Tue May 16 07:49:36 2006
@@ -56,12 +56,12 @@
         child1.stop();
         assertFlowFailed(flow);
     }
-    
+
     public void testJoinAllTerminatesAsSoonAsOneChildFails() throws Exception {
         JoinAll flow = new JoinAll(child1, child2, child3);
         flow.setFailFast(true);
         startFlow(flow, timeout);
-        
+
         child1.fail("Test case error simulation");
         assertFlowFailed(flow);
     }
@@ -78,9 +78,9 @@
 
         // lets force a timeout failure
         Thread.sleep(timeout * 2);
-        
+
         assertFlowFailed(flow);
-        
+
         // lets check that completing the final child flow keeps the join failed
         child3.stop();
         assertFlowFailed(flow);

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/JoinQuorumTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/JoinQuorumTest.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/JoinQuorumTest.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/JoinQuorumTest.java Tue May 16 07:49:36 2006
@@ -34,7 +34,7 @@
 
         child2.stop();
         assertFlowStopped(flow);
-        
+
         // lets check things are still fine when the quorum is complete
         child3.stop();
         assertFlowStopped(flow);
@@ -46,7 +46,7 @@
 
         child3.fail("Test case error simulation");
         assertFlowStarted(flow);
-        
+
         child2.fail("Test case error simulation");
         assertFlowFailed(flow);
     }

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ParallelActivityTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ParallelActivityTest.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ParallelActivityTest.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/ParallelActivityTest.java Tue May 16 07:49:36 2006
@@ -28,10 +28,10 @@
 
     @SuppressWarnings("unchecked")
     public void test() throws Exception {
-        
+
         // START SNIPPET: example
         ExampleParallelBean parallelBean = new ExampleParallelBean();
-        ParallelActivity activity =  ParallelActivity.newParallelMethodActivity(executor, parallelBean);
+        ParallelActivity activity = ParallelActivity.newParallelMethodActivity(executor, parallelBean);
         activity.startWithTimeout(timer, -1);
         // END SNIPPET: example
 

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/TimeoutFlowTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/TimeoutFlowTest.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/TimeoutFlowTest.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/TimeoutFlowTest.java Tue May 16 07:49:36 2006
@@ -23,18 +23,19 @@
  */
 public class TimeoutFlowTest extends FlowTestSupport {
     protected TimeoutActivity flow = new TimeoutActivity();
-    
+
     public void testFlowStopsSuccessfully() throws Exception {
         flow.getState().set(Transitions.Stopped);
         assertFlowStopped(flow);
-        
-        // lets sleep so that the timer can go off now to check we don't fail after we've stopped
-        Thread.sleep(timeout  * 4);
+
+        // lets sleep so that the timer can go off now to check we don't fail
+        // after we've stopped
+        Thread.sleep(timeout * 4);
         assertFlowStopped(flow);
     }
 
     public void testFlowTimesOutAndFails() throws Exception {
-        Thread.sleep(timeout  * 4);
+        Thread.sleep(timeout * 4);
         assertFlowFailed(flow);
     }
 

Modified: incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/WorkflowTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/WorkflowTest.java?rev=406961&r1=406960&r2=406961&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/WorkflowTest.java (original)
+++ incubator/servicemix/trunk/servicemix-beanflow/src/test/java/org/apache/servicemix/beanflow/WorkflowTest.java Tue May 16 07:49:36 2006
@@ -15,29 +15,34 @@
  */
 package org.apache.servicemix.beanflow;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
- *
+ * 
  * @version $Revision: $
  */
-public class WorkflowTest extends FlowTestSupport  {
+public class WorkflowTest extends FlowTestSupport {
+
+    private static final Log log = LogFactory.getLog(WorkflowTest.class);
 
     public void testWorkflow() throws Exception {
         // START SNIPPET: workflow
         ExampleWorkflow workflow = new ExampleWorkflow();
         workflow.start();
-        
+
         // wait for user entry point
         Thread.sleep(2000);
-        
+
         workflow.userEntered("foo");
         assertFlowStarted(workflow);
-        
-        System.out.println("We are entering some valid input");
-        
+
+        log.info("We are entering some valid input");
+
         workflow.userEntered("foo@bar.com");
-        
+
         Thread.sleep(5000);
-        
+
         assertFlowStopped(workflow);
     }
 }