You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Andreas Guther (JIRA)" <ji...@apache.org> on 2007/10/09 23:46:23 UTC

[jira] Created: (CAMEL-170) FW: Receipient *List* seems not to work in Camel 1.2.0

FW: Receipient *List* seems not to work in Camel 1.2.0
------------------------------------------------------

                 Key: CAMEL-170
                 URL: https://issues.apache.org/activemq/browse/CAMEL-170
             Project: Apache Camel
          Issue Type: Bug
    Affects Versions: 1.2.0
            Reporter: Andreas Guther
            Assignee: James Strachan




-----Original Message-----
From: Jos Dirksen [mailto:jos.dirksen@gmail.com] 
Sent: Tuesday, October 09, 2007 2:06 PM
To: camel-user@activemq.apache.org
Subject: Re: Receipient *List* seems not to work in Camel 1.2.0


I'm experiencing the same problem. With the 1.2.0 release and also with the
latest from SVN. One way or the other the last route is always used.

    private final static String ENDPOINT_1 =
"jbi:endpoint:http://servicemix.apache.org/samples/filemover/fileSender/fileSenderEndpoint";
    private final static String ENDPOINT_2 =
"jbi:endpoint:http://servicemix.apache.org/samples/filemover/anotherFileSender/anotherFileSenderEndpoint";
    
    public void configure() throws Exception {
       
from("jbi:service:http://servicemix.apache.org/samples/filemover/camelReceiver").to(ENDPOINT_1,ENDPOINT_2);
    }

Very simple route, however instead of sending it once to endpoint_1 it get's
sent twice to endpoint_2.

I've been debugging a bit and to problem seem to occur in the "
wrapProcessorInInterceptors(RouteContext routeContext, Processor target)"
method of the ProcessorType class. 

To be more specific, I can see my old routes being overwritten in this part
of the method:

        for (InterceptorType interceptorRef : interceptors) {
            DelegateProcessor p =
interceptorRef.createInterceptor(routeContext);
            if (first == null) {
                first = p;
            }
            if (last != null) {
                last.setProcessor(p);
            }
            last = p;
        }

        if (last != null) {
            last.setProcessor(target);
        }


Andreas G Guther wrote:
> 
> Either I am getting something wrong or the current 1.2.0 version has
> some problems.
> 

-- 
View this message in context: http://www.nabble.com/Receipient-*List*-seems-not-to-work-in-Camel-1.2.0-tf4596679s22882.html#a13124770
Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-170) FW: Receipient *List* seems not to work in Camel 1.2.0

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Strachan updated CAMEL-170:
---------------------------------

    Assignee:     (was: James Strachan)

> FW: Receipient *List* seems not to work in Camel 1.2.0
> ------------------------------------------------------
>
>                 Key: CAMEL-170
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-170
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Andreas Guther
>
> -----Original Message-----
> From: Jos Dirksen [mailto:jos.dirksen@gmail.com] 
> Sent: Tuesday, October 09, 2007 2:06 PM
> To: camel-user@activemq.apache.org
> Subject: Re: Receipient *List* seems not to work in Camel 1.2.0
> I'm experiencing the same problem. With the 1.2.0 release and also with the
> latest from SVN. One way or the other the last route is always used.
>     private final static String ENDPOINT_1 =
> "jbi:endpoint:http://servicemix.apache.org/samples/filemover/fileSender/fileSenderEndpoint";
>     private final static String ENDPOINT_2 =
> "jbi:endpoint:http://servicemix.apache.org/samples/filemover/anotherFileSender/anotherFileSenderEndpoint";
>     
>     public void configure() throws Exception {
>        
> from("jbi:service:http://servicemix.apache.org/samples/filemover/camelReceiver").to(ENDPOINT_1,ENDPOINT_2);
>     }
> Very simple route, however instead of sending it once to endpoint_1 it get's
> sent twice to endpoint_2.
> I've been debugging a bit and to problem seem to occur in the "
> wrapProcessorInInterceptors(RouteContext routeContext, Processor target)"
> method of the ProcessorType class. 
> To be more specific, I can see my old routes being overwritten in this part
> of the method:
>         for (InterceptorType interceptorRef : interceptors) {
>             DelegateProcessor p =
> interceptorRef.createInterceptor(routeContext);
>             if (first == null) {
>                 first = p;
>             }
>             if (last != null) {
>                 last.setProcessor(p);
>             }
>             last = p;
>         }
>         if (last != null) {
>             last.setProcessor(target);
>         }
> Andreas G Guther wrote:
> > 
> > Either I am getting something wrong or the current 1.2.0 version has
> > some problems.
> > 
> -- 
> View this message in context: http://www.nabble.com/Receipient-*List*-seems-not-to-work-in-Camel-1.2.0-tf4596679s22882.html#a13124770
> Sent from the Camel - Users mailing list archive at Nabble.com.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-170) FW: Receipient *List* seems not to work in Camel 1.2.0

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40353 ] 

James Strachan commented on CAMEL-170:
--------------------------------------

FWIW I've just added this test case from that thread...


{code}

public class MyRouteBuilder extends RouteBuilder { 

   public static final String Q1 = "jms:test.MyQueue.ONE-1"; 
   public static final String Q2 = "jms:test.Number.2"; 
   public static final String Q3 = "jms:test.Number.3"; 
    /** 
     * Allow this route to be run as an application 
     * 
     * @param args 
     */ 
    public static void main(String[] args) { 
        new Main().run(args); 
    } 

    public void configure() { 
                System.out.println("**** Configuring ****"); 
        // lets populate the message queue with some messages 
        from("file:src/data?noop=true").to(Q1); 

        //from(Q1).to("file://target/test?noop=true");  // works fine 
and writes into file system 
                //from(Q1).to(Q2); // works also fine, writes into Q2 

                //from(Q1).to("file://target/test?noop=true", Q2); // 
writes to Q2 but not to file 
                //from(Q1).to(Q2, "file://target/test?noop=true"); // 
writes to file but not to Q2 
                from(Q1).to(Q2, Q3); // write to Q3 but not to Q2 

        // set up a listener on the file component 
        from("file://target/test?noop=true"). 
                bean(new SomeBean()); 
    } 

    public static class SomeBean { 

        public void someMethod(String body) { 
            System.out.println("Received: " + body); 
        } 
    } 
} 
{code}

I refactored a little and added it as Issue170Test to camel-core - though its working fine with trunk!

Will investigate trying to break it - such as by moving to the JMS transport

> FW: Receipient *List* seems not to work in Camel 1.2.0
> ------------------------------------------------------
>
>                 Key: CAMEL-170
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-170
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Andreas Guther
>            Assignee: James Strachan
>
> -----Original Message-----
> From: Jos Dirksen [mailto:jos.dirksen@gmail.com] 
> Sent: Tuesday, October 09, 2007 2:06 PM
> To: camel-user@activemq.apache.org
> Subject: Re: Receipient *List* seems not to work in Camel 1.2.0
> I'm experiencing the same problem. With the 1.2.0 release and also with the
> latest from SVN. One way or the other the last route is always used.
>     private final static String ENDPOINT_1 =
> "jbi:endpoint:http://servicemix.apache.org/samples/filemover/fileSender/fileSenderEndpoint";
>     private final static String ENDPOINT_2 =
> "jbi:endpoint:http://servicemix.apache.org/samples/filemover/anotherFileSender/anotherFileSenderEndpoint";
>     
>     public void configure() throws Exception {
>        
> from("jbi:service:http://servicemix.apache.org/samples/filemover/camelReceiver").to(ENDPOINT_1,ENDPOINT_2);
>     }
> Very simple route, however instead of sending it once to endpoint_1 it get's
> sent twice to endpoint_2.
> I've been debugging a bit and to problem seem to occur in the "
> wrapProcessorInInterceptors(RouteContext routeContext, Processor target)"
> method of the ProcessorType class. 
> To be more specific, I can see my old routes being overwritten in this part
> of the method:
>         for (InterceptorType interceptorRef : interceptors) {
>             DelegateProcessor p =
> interceptorRef.createInterceptor(routeContext);
>             if (first == null) {
>                 first = p;
>             }
>             if (last != null) {
>                 last.setProcessor(p);
>             }
>             last = p;
>         }
>         if (last != null) {
>             last.setProcessor(target);
>         }
> Andreas G Guther wrote:
> > 
> > Either I am getting something wrong or the current 1.2.0 version has
> > some problems.
> > 
> -- 
> View this message in context: http://www.nabble.com/Receipient-*List*-seems-not-to-work-in-Camel-1.2.0-tf4596679s22882.html#a13124770
> Sent from the Camel - Users mailing list archive at Nabble.com.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-170) FW: Receipient *List* seems not to work in Camel 1.2.0

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hadrian Zbarcea updated CAMEL-170:
----------------------------------

    Fix Version/s: 1.2.0

> FW: Receipient *List* seems not to work in Camel 1.2.0
> ------------------------------------------------------
>
>                 Key: CAMEL-170
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-170
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Andreas Guther
>             Fix For: 1.2.0
>
>
> -----Original Message-----
> From: Jos Dirksen [mailto:jos.dirksen@gmail.com] 
> Sent: Tuesday, October 09, 2007 2:06 PM
> To: camel-user@activemq.apache.org
> Subject: Re: Receipient *List* seems not to work in Camel 1.2.0
> I'm experiencing the same problem. With the 1.2.0 release and also with the
> latest from SVN. One way or the other the last route is always used.
>     private final static String ENDPOINT_1 =
> "jbi:endpoint:http://servicemix.apache.org/samples/filemover/fileSender/fileSenderEndpoint";
>     private final static String ENDPOINT_2 =
> "jbi:endpoint:http://servicemix.apache.org/samples/filemover/anotherFileSender/anotherFileSenderEndpoint";
>     
>     public void configure() throws Exception {
>        
> from("jbi:service:http://servicemix.apache.org/samples/filemover/camelReceiver").to(ENDPOINT_1,ENDPOINT_2);
>     }
> Very simple route, however instead of sending it once to endpoint_1 it get's
> sent twice to endpoint_2.
> I've been debugging a bit and to problem seem to occur in the "
> wrapProcessorInInterceptors(RouteContext routeContext, Processor target)"
> method of the ProcessorType class. 
> To be more specific, I can see my old routes being overwritten in this part
> of the method:
>         for (InterceptorType interceptorRef : interceptors) {
>             DelegateProcessor p =
> interceptorRef.createInterceptor(routeContext);
>             if (first == null) {
>                 first = p;
>             }
>             if (last != null) {
>                 last.setProcessor(p);
>             }
>             last = p;
>         }
>         if (last != null) {
>             last.setProcessor(target);
>         }
> Andreas G Guther wrote:
> > 
> > Either I am getting something wrong or the current 1.2.0 version has
> > some problems.
> > 
> -- 
> View this message in context: http://www.nabble.com/Receipient-*List*-seems-not-to-work-in-Camel-1.2.0-tf4596679s22882.html#a13124770
> Sent from the Camel - Users mailing list archive at Nabble.com.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-170) FW: Receipient *List* seems not to work in Camel 1.2.0

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Strachan resolved CAMEL-170.
----------------------------------

    Resolution: Cannot Reproduce

Until we figure out how to reproduce this issue, I'm gonna mark it as cannot reproduce - let us know if you can find a way to reproduce and we can reopen

> FW: Receipient *List* seems not to work in Camel 1.2.0
> ------------------------------------------------------
>
>                 Key: CAMEL-170
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-170
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Andreas Guther
>
> -----Original Message-----
> From: Jos Dirksen [mailto:jos.dirksen@gmail.com] 
> Sent: Tuesday, October 09, 2007 2:06 PM
> To: camel-user@activemq.apache.org
> Subject: Re: Receipient *List* seems not to work in Camel 1.2.0
> I'm experiencing the same problem. With the 1.2.0 release and also with the
> latest from SVN. One way or the other the last route is always used.
>     private final static String ENDPOINT_1 =
> "jbi:endpoint:http://servicemix.apache.org/samples/filemover/fileSender/fileSenderEndpoint";
>     private final static String ENDPOINT_2 =
> "jbi:endpoint:http://servicemix.apache.org/samples/filemover/anotherFileSender/anotherFileSenderEndpoint";
>     
>     public void configure() throws Exception {
>        
> from("jbi:service:http://servicemix.apache.org/samples/filemover/camelReceiver").to(ENDPOINT_1,ENDPOINT_2);
>     }
> Very simple route, however instead of sending it once to endpoint_1 it get's
> sent twice to endpoint_2.
> I've been debugging a bit and to problem seem to occur in the "
> wrapProcessorInInterceptors(RouteContext routeContext, Processor target)"
> method of the ProcessorType class. 
> To be more specific, I can see my old routes being overwritten in this part
> of the method:
>         for (InterceptorType interceptorRef : interceptors) {
>             DelegateProcessor p =
> interceptorRef.createInterceptor(routeContext);
>             if (first == null) {
>                 first = p;
>             }
>             if (last != null) {
>                 last.setProcessor(p);
>             }
>             last = p;
>         }
>         if (last != null) {
>             last.setProcessor(target);
>         }
> Andreas G Guther wrote:
> > 
> > Either I am getting something wrong or the current 1.2.0 version has
> > some problems.
> > 
> -- 
> View this message in context: http://www.nabble.com/Receipient-*List*-seems-not-to-work-in-Camel-1.2.0-tf4596679s22882.html#a13124770
> Sent from the Camel - Users mailing list archive at Nabble.com.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-170) FW: Receipient *List* seems not to work in Camel 1.2.0

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40354 ] 

James Strachan commented on CAMEL-170:
--------------------------------------

OK I've added another test case which derives from Issue170Test which rather than using mock endpoints, uses JMS. So we send a message to a queue (Q1), then go from Q1 -> two JMS queues. Then separately we consume from those 2 JMS queues to send to the 2 mock endpoints for the tests. It all works for me.

https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsIssue170Test.java

and here's the base class which tests using just mock endpoints
https://svn.apache.org/repos/asf/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/Issue170Test.java

Any idea how to reproduce using just camel and file / JMS endpoints? Maybe this has now been resolved in trunk?

> FW: Receipient *List* seems not to work in Camel 1.2.0
> ------------------------------------------------------
>
>                 Key: CAMEL-170
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-170
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Andreas Guther
>            Assignee: James Strachan
>
> -----Original Message-----
> From: Jos Dirksen [mailto:jos.dirksen@gmail.com] 
> Sent: Tuesday, October 09, 2007 2:06 PM
> To: camel-user@activemq.apache.org
> Subject: Re: Receipient *List* seems not to work in Camel 1.2.0
> I'm experiencing the same problem. With the 1.2.0 release and also with the
> latest from SVN. One way or the other the last route is always used.
>     private final static String ENDPOINT_1 =
> "jbi:endpoint:http://servicemix.apache.org/samples/filemover/fileSender/fileSenderEndpoint";
>     private final static String ENDPOINT_2 =
> "jbi:endpoint:http://servicemix.apache.org/samples/filemover/anotherFileSender/anotherFileSenderEndpoint";
>     
>     public void configure() throws Exception {
>        
> from("jbi:service:http://servicemix.apache.org/samples/filemover/camelReceiver").to(ENDPOINT_1,ENDPOINT_2);
>     }
> Very simple route, however instead of sending it once to endpoint_1 it get's
> sent twice to endpoint_2.
> I've been debugging a bit and to problem seem to occur in the "
> wrapProcessorInInterceptors(RouteContext routeContext, Processor target)"
> method of the ProcessorType class. 
> To be more specific, I can see my old routes being overwritten in this part
> of the method:
>         for (InterceptorType interceptorRef : interceptors) {
>             DelegateProcessor p =
> interceptorRef.createInterceptor(routeContext);
>             if (first == null) {
>                 first = p;
>             }
>             if (last != null) {
>                 last.setProcessor(p);
>             }
>             last = p;
>         }
>         if (last != null) {
>             last.setProcessor(target);
>         }
> Andreas G Guther wrote:
> > 
> > Either I am getting something wrong or the current 1.2.0 version has
> > some problems.
> > 
> -- 
> View this message in context: http://www.nabble.com/Receipient-*List*-seems-not-to-work-in-Camel-1.2.0-tf4596679s22882.html#a13124770
> Sent from the Camel - Users mailing list archive at Nabble.com.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.