james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r917544 - in /james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel: MailProcessorRouteBuilder.java MailRouter.java RoutingSlipHeaderProcessor.java
Date Mon, 01 Mar 2010 14:24:42 GMT
Author: norman
Date: Mon Mar  1 14:24:42 2010
New Revision: 917544

URL: http://svn.apache.org/viewvc?rev=917544&view=rev
Log:
Use RecipientList for choosing the activemq queue

Removed:
    james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/RoutingSlipHeaderProcessor.java
Modified:
    james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/MailProcessorRouteBuilder.java
    james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/MailRouter.java

Modified: james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/MailProcessorRouteBuilder.java
URL: http://svn.apache.org/viewvc/james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/MailProcessorRouteBuilder.java?rev=917544&r1=917543&r2=917544&view=diff
==============================================================================
--- james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/MailProcessorRouteBuilder.java
(original)
+++ james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/MailProcessorRouteBuilder.java
Mon Mar  1 14:24:42 2010
@@ -214,9 +214,8 @@
                             .when(new MailStateEquals(Mail.GHOST)).stop()
                              
                             // check if the state of the mail is the same as the
-                            // current processor. If not just route it to the right endpoint
via routingSlip.
-                            // we use the routingSlip because @RecipientList not work as
aspected. See https://issues.apache.org/activemq/browse/CAMEL-2507
-                            .when(new MailStateNotEquals(processorName)).process(new RoutingSlipHeaderProcessor()).routingSlip(RoutingSlipHeaderProcessor.ROUTESLIP_HEADER).stop()
+                            // current processor. If not just route it to the right endpoint
via recipientList.
+                            .when(new MailStateNotEquals(processorName)).recipientList().method(MailRouter.class)
                             
                             // end first choice
                             .end()
@@ -249,9 +248,9 @@
                     // end the choice
                     .end()
                     
-                    // route it to the right processor
-                    // we use the routingSlip because @RecipientList not work as aspected.
See https://issues.apache.org/activemq/browse/CAMEL-2507
-                    .process(new RoutingSlipHeaderProcessor()).routingSlip(RoutingSlipHeaderProcessor.ROUTESLIP_HEADER).stop();
+                     // route it to the right processor
+                    .recipientList().method(MailRouter.class);
+                  
         }
     }
 

Modified: james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/MailRouter.java
URL: http://svn.apache.org/viewvc/james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/MailRouter.java?rev=917544&r1=917543&r2=917544&view=diff
==============================================================================
--- james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/MailRouter.java
(original)
+++ james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/camel/MailRouter.java
Mon Mar  1 14:24:42 2010
@@ -19,20 +19,22 @@
 package org.apache.james.transport.camel;
 
 import org.apache.camel.Body;
-import org.apache.camel.RecipientList;
 import org.apache.mailet.Mail;
 
 /**
  * Route the mail to the right JMS queue depending on the state of the Mail. 
  * 
- * This is not used atm because of this bug:
- * https://issues.apache.org/activemq/browse/CAMEL-2507
  * 
  *
  */
 public class MailRouter {
     
-    @RecipientList
+    /**
+     * Route Mail to the right JMS queue based on the state of the mail
+     * 
+     * @param mail
+     * @return camel endpoint uri
+     */
     public String to(@Body Mail mail) {
         String queueName = "activemq:queue:processor."+ mail.getState();
         return queueName;



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message