activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r538923 - in /activemq/camel/trunk/camel-bam/src: main/java/org/apache/camel/bam/ main/java/org/apache/camel/bam/model/ main/java/org/apache/camel/bam/processor/ main/java/org/apache/camel/bam/rules/ test/java/org/apache/camel/bam/
Date Thu, 17 May 2007 13:55:41 GMT
Author: jstrachan
Date: Thu May 17 06:55:37 2007
New Revision: 538923

URL: http://svn.apache.org/viewvc?view=rev&rev=538923
Log:
minor refactor removing the dead cruft and moving classes into an easier to follow package
structure with builders, processors and rules separated

Added:
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
  (contents, props changed)
      - copied, changed from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityMonitorEngine.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/BamProcessorSupport.java
      - copied, changed from r538665, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/BamProcessorSupport.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
      - copied, changed from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/JpaBamProcessor.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
      - copied, changed from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/JpaBamProcessorSupport.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/NoCorrelationKeyException.java
      - copied, changed from r538075, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/NoCorrelationKeyException.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ProcessContext.java
  (contents, props changed)
      - copied, changed from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessContext.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/ActivityRules.java
      - copied, changed from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityRules.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java
      - copied, changed from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessRules.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java
      - copied, changed from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TemporalRule.java
Removed:
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityMonitorEngine.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityRules.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/BamBuilder.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/BamProcessorSupport.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/JpaBamProcessor.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/JpaBamProcessorSupport.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/NoCorrelationKeyException.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessContext.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessExpressionSupport.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessRules.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TemporalBuilder.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TemporalRule.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeBuilder.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimerEngine.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimerEventHandler.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/AfterRule.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/TimerEvent.java
    activemq/camel/trunk/camel-bam/src/test/java/org/apache/camel/bam/TimerTest.java
Modified:
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityBuilder.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeExpression.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/ActivityState.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java
    activemq/camel/trunk/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityBuilder.java?view=diff&rev=538923&r1=538922&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityBuilder.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityBuilder.java
Thu May 17 06:55:37 2007
@@ -21,6 +21,7 @@
 import org.apache.camel.Processor;
 import org.apache.camel.bam.model.ActivityState;
 import org.apache.camel.bam.model.ProcessInstance;
+import org.apache.camel.bam.rules.ActivityRules;
 import org.apache.camel.builder.ProcessorFactory;
 
 import java.util.Date;

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java?view=diff&rev=538923&r1=538922&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
Thu May 17 06:55:37 2007
@@ -22,6 +22,9 @@
 import org.apache.camel.bam.model.ProcessInstance;
 import org.apache.camel.bam.model.ActivityDefinition;
 import org.apache.camel.bam.model.ProcessDefinition;
+import org.apache.camel.bam.processor.JpaBamProcessor;
+import org.apache.camel.bam.processor.ActivityMonitorEngine;
+import org.apache.camel.bam.rules.ProcessRules;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.processor.LifecycleProcessor;
 import static org.apache.camel.util.ObjectHelper.notNull;

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeExpression.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeExpression.java?view=diff&rev=538923&r1=538922&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeExpression.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeExpression.java
Thu May 17 06:55:37 2007
@@ -18,6 +18,8 @@
 
 import org.apache.camel.bam.model.ActivityState;
 import org.apache.camel.bam.model.ProcessInstance;
+import org.apache.camel.bam.rules.TemporalRule;
+import org.apache.camel.bam.rules.ActivityRules;
 import org.apache.camel.util.ObjectHelper;
 
 import java.util.Date;

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/ActivityState.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/ActivityState.java?view=diff&rev=538923&r1=538922&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/ActivityState.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/ActivityState.java
Thu May 17 06:55:37 2007
@@ -16,17 +16,16 @@
  */
 package org.apache.camel.bam.model;
 
-import org.apache.camel.bam.ActivityRules;
-import org.apache.camel.bam.ProcessContext;
-import org.apache.camel.bam.TimerEventHandler;
+import org.apache.camel.bam.rules.ActivityRules;
+import org.apache.camel.bam.processor.ProcessContext;
 import org.apache.camel.util.ObjectHelper;
 
 import javax.persistence.CascadeType;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
-import javax.persistence.ManyToOne;
-import javax.persistence.Id;
 import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
 import java.util.Date;
 
 /**
@@ -35,7 +34,7 @@
  * @version $Revision: $
  */
 @Entity
-public class ActivityState extends TemporalEntity implements TimerEventHandler {
+public class ActivityState extends TemporalEntity {
     private ProcessInstance processInstance;
     private Integer receivedMessageCount = 0;
     private ActivityDefinition activityDefinition;
@@ -83,13 +82,6 @@
         return ObjectHelper.equals(getActivityDefinition(), activityRules.getActivityDefinition());
     }
 
-    /**
-     * Invoked by the timer firing
-     */
-    public void onTimerEvent(TimerEvent event) {
-        // TODO do check on this entity
-    }
-
     // Properties
     //-----------------------------------------------------------------------
     @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@@ -143,16 +135,12 @@
         this.timeOverdue = timeOverdue;
     }
 
-
-
     public void setTimeCompleted(Date timeCompleted) {
         super.setTimeCompleted(timeCompleted);
         if (timeCompleted != null) {
             setEscalationLevel(-1);
         }
     }
-
-
 
     // Implementation methods
     //-----------------------------------------------------------------------

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java?view=diff&rev=538923&r1=538922&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java
Thu May 17 06:55:37 2007
@@ -18,7 +18,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.camel.bam.ActivityRules;
+import org.apache.camel.bam.rules.ActivityRules;
 
 import javax.persistence.CascadeType;
 import javax.persistence.Entity;

Copied: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
(from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityMonitorEngine.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java?view=diff&rev=538923&p1=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityMonitorEngine.java&r1=538915&p2=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityMonitorEngine.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
Thu May 17 06:55:37 2007
@@ -15,9 +15,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.bam;
+package org.apache.camel.bam.processor;
 
 import org.apache.camel.bam.model.ActivityState;
+import org.apache.camel.bam.rules.ProcessRules;
 import org.apache.camel.impl.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Propchange: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/BamProcessorSupport.java
(from r538665, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/BamProcessorSupport.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/BamProcessorSupport.java?view=diff&rev=538923&p1=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/BamProcessorSupport.java&r1=538665&p2=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/BamProcessorSupport.java&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/BamProcessorSupport.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/BamProcessorSupport.java
Thu May 17 06:55:37 2007
@@ -14,19 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.bam;
+package org.apache.camel.bam.processor;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.camel.Processor;
 import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.bam.processor.NoCorrelationKeyException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.transaction.support.TransactionTemplate;
-import org.springframework.transaction.support.TransactionCallbackWithoutResult;
 import org.springframework.transaction.support.TransactionCallback;
 import org.springframework.transaction.TransactionStatus;
-import org.springframework.transaction.TransactionException;
 
 import java.lang.reflect.Type;
 import java.lang.reflect.ParameterizedType;

Copied: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
(from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/JpaBamProcessor.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java?view=diff&rev=538923&p1=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/JpaBamProcessor.java&r1=538915&p2=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/JpaBamProcessor.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
Thu May 17 06:55:37 2007
@@ -14,10 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.bam;
+package org.apache.camel.bam.processor;
 
 import org.apache.camel.bam.model.*;
 import org.apache.camel.bam.model.ProcessInstance;
+import org.apache.camel.bam.rules.ActivityRules;
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.commons.logging.Log;

Copied: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
(from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/JpaBamProcessorSupport.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java?view=diff&rev=538923&p1=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/JpaBamProcessorSupport.java&r1=538915&p2=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/JpaBamProcessorSupport.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
Thu May 17 06:55:37 2007
@@ -14,12 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.bam;
+package org.apache.camel.bam.processor;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.camel.Processor;
 import org.apache.camel.bam.model.ProcessDefinition;
+import org.apache.camel.bam.rules.ActivityRules;
 import org.apache.camel.util.IntrospectionSupport;
 import org.springframework.orm.jpa.JpaTemplate;
 import org.springframework.transaction.support.TransactionTemplate;

Copied: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/NoCorrelationKeyException.java
(from r538075, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/NoCorrelationKeyException.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/NoCorrelationKeyException.java?view=diff&rev=538923&p1=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/NoCorrelationKeyException.java&r1=538075&p2=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/NoCorrelationKeyException.java&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/NoCorrelationKeyException.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/NoCorrelationKeyException.java
Thu May 17 06:55:37 2007
@@ -14,10 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.bam;
+package org.apache.camel.bam.processor;
 
 import org.apache.camel.CamelException;
 import org.apache.camel.Exchange;
+import org.apache.camel.bam.processor.BamProcessorSupport;
 
 /**
  * An exception thrown if no correlation key could be found for a message

Copied: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ProcessContext.java
(from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessContext.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ProcessContext.java?view=diff&rev=538923&p1=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessContext.java&r1=538915&p2=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ProcessContext.java&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessContext.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ProcessContext.java
Thu May 17 06:55:37 2007
@@ -15,11 +15,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.bam;
+package org.apache.camel.bam.processor;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.bam.model.ProcessInstance;
 import org.apache.camel.bam.model.ActivityState;
+import org.apache.camel.bam.rules.ProcessRules;
+import org.apache.camel.bam.rules.ActivityRules;
 
 /**
  * @version $Revision: 1.1 $

Propchange: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ProcessContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/ActivityRules.java
(from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityRules.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/ActivityRules.java?view=diff&rev=538923&p1=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityRules.java&r1=538915&p2=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/ActivityRules.java&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityRules.java (original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/ActivityRules.java
Thu May 17 06:55:37 2007
@@ -14,17 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.bam;
+package org.apache.camel.bam.rules;
 
 import org.apache.camel.bam.model.ActivityDefinition;
 import org.apache.camel.bam.model.ActivityState;
 import org.apache.camel.bam.model.ProcessInstance;
+import org.apache.camel.bam.ProcessBuilder;
 import org.apache.camel.Exchange;
 import org.apache.camel.util.ServiceHelper;
 import org.apache.camel.impl.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.orm.jpa.JpaTemplate;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -42,7 +42,7 @@
     private List<TemporalRule> rules = new ArrayList<TemporalRule>();
     private ActivityDefinition activityDefinition;
     private String activityName;
-    private final ProcessBuilder builder;
+    private final org.apache.camel.bam.ProcessBuilder builder;
 
     public ActivityRules(ProcessBuilder builder) {
         this.builder = builder;

Copied: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java
(from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessRules.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java?view=diff&rev=538923&p1=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessRules.java&r1=538915&p2=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ProcessRules.java (original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java
Thu May 17 06:55:37 2007
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.bam;
+package org.apache.camel.bam.rules;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.bam.model.ActivityState;

Copied: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java
(from r538915, activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TemporalRule.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java?view=diff&rev=538923&p1=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TemporalRule.java&r1=538915&p2=activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TemporalRule.java (original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java
Thu May 17 06:55:37 2007
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.bam;
+package org.apache.camel.bam.rules;
 
 import static org.apache.camel.util.ServiceHelper.startServices;
 import static org.apache.camel.util.ServiceHelper.stopServices;
@@ -22,12 +22,12 @@
 import org.apache.camel.Processor;
 import org.apache.camel.bam.model.ActivityState;
 import org.apache.camel.bam.model.ProcessInstance;
+import org.apache.camel.bam.TimeExpression;
 import org.apache.camel.builder.FromBuilder;
 import org.apache.camel.builder.ProcessorFactory;
 import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.impl.ServiceSupport;
 import org.apache.camel.util.Time;
-import org.apache.camel.util.ServiceHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -114,27 +114,8 @@
                 secondState.setTimeOverdue(overdue);
             }
         }
-
-        Date secondTime = second.evaluateState(instance);
-        if (secondTime == null) {
-            // TODO add test that things have expired
-        }
-        else {
-
-/*
-            if (secondTime.delta(firstTime.plus(gap)) > 0) {
-                // TODO
-            }
-*/
-        }
     }
 
-    /*
-    public void evaluate(ProcessContext context, ActivityState activityState) {
-        ProcessInstance instance = context.getProcessInstance();
-
-    }
-    */
 
     public void processExpired(ActivityState activityState) throws Exception {
         Processor processor = getOverdueAction();
@@ -176,19 +157,6 @@
     protected Date add(Date date, long millis) {
         return new Date(date.getTime() + millis);
     }
-
-    /*
-    public void onActivityLifecycle(ActivityState state, ActivityRules activityRules, ActivityLifecycle
lifecycle) {
-        if (first.isActivityLifecycle(activityRules, lifecycle)) {
-            // lets create the expected and error timers
-
-            // TODO we could use a single timer event; then keep incrementing its type
-            // counter to escalate & use different times each time to reduce some DB
work
-            createTimer(state, expectedMillis);
-            createTimer(state, overdueMillis);
-        }
-    }
-    */
 
     protected void doStart() throws Exception {
         startServices(getOverdueAction());

Modified: activemq/camel/trunk/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java?view=diff&rev=538923&r1=538922&r2=538923
==============================================================================
--- activemq/camel/trunk/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java (original)
+++ activemq/camel/trunk/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java Thu
May 17 06:55:37 2007
@@ -16,15 +16,10 @@
  */
 package org.apache.camel.bam;
 
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.SpringCamelContext;
 import org.apache.camel.spring.SpringTestSupport;
-import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.builder.xml.XPathBuilder.xpath;
 import static org.apache.camel.util.Time.seconds;
-import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.orm.jpa.JpaTemplate;
 import org.springframework.transaction.support.TransactionTemplate;
@@ -79,36 +74,6 @@
                 b.starts().after(a.completes())
                         .expectWithin(seconds(1))
                         .errorIfOver(seconds(2)).to("mock:overdue");
-
-                /*
-        expect(b.starts().after(10).minutes().from(a.starts());
-
-
-
-
-        process.activity("direct:a").name("a")
-                .correlate(header("foo"))
-                .expect(seconds(10)).afterProcess().starts();
-                .expectedAfter(10).minutes();
-                .errorAfter(30).minutes();
-
-
-        process.activity("direct:b").name("b")
-                .correlate(header("foo"))
-                .expect(minutes(10)).after("a").completes();
-
-
-        BamBuilder bam = BamBuilder.monitor(this, "direct:a", "direct:b", "direct:c");
-
-        bam.process("direct:b",).expectedMesageCount(1)
-                .expectedAfter().minutes(10)
-                .errorAfter().minutes(30);
-
-        bam.expects("direct:c").expectedMesageCount(1)
-                .expectedAfter().minutes(10)
-                .errorAfter().minutes(30);
-
-                */
             }
         };
     }



Mime
View raw message