camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject RE: HttpProducer incorrect behaviour
Date Sat, 09 Aug 2008 07:00:00 GMT
Hi Bill

Good spots. Could you report this as a bug in the JIRA? Then it's not forgotten.

And if you fancy, then patches or any kind of contributions is much welcome.
http://activemq.apache.org/camel/contributing.html



Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: tourist604 [mailto:idea@skrypnyk.net] 
Sent: 8. august 2008 20:44
To: camel-user@activemq.apache.org
Subject: HttpProducer incorrect behaviour


Hi,

I believe there is incorrect flow in the HttpProducer which can subvert
error handling in the route:

in Camel 1.4.0 in HttpProducer on line 76 a "blank" out message is set on
the exchange:

Message out = exchange.getOut(true);
        try {
            int responseCode = httpClient.executeMethod(method);
...

1. If an IO error occurs on connect, the out message will be passed to the
error handling code and if the originating endpoint was a JmsMessage it will
cause an NPE when JmsMessage.getMessageId() is called. It also obscures the
offending message I believe.
2. A similar situation will happen if the HTTP service returned an error
code; the out message will contain a reply message even though the
processing resulted in an error.

Perhaps, I am missing also how to get a hold of the original Exchange and
Message if the route execution resulted in a "logical" error. The original
Message can then be squirrelled away for later retries for example.

Cheers,
--Bill
-- 
View this message in context: http://www.nabble.com/HttpProducer-incorrect-behaviour-tp18897168s22882p18897168.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message