camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Created: (CAMEL-364) camel-mina if exchange failed then out could potentially be a copy of in
Date Thu, 06 Mar 2008 06:06:35 GMT
camel-mina if exchange failed then out could potentially be a copy of in

                 Key: CAMEL-364
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-mina
    Affects Versions: 1.3.0
            Reporter: Claus Ibsen
            Priority: Minor

Using the camel-mina component in synchronous mode (InOut exchange pattern) there is a potential
bug if eg a processor throws an exception.

This is a failed delivery in camel. And out-of-the-box the default policy is to retry up till
6 times. And if still failing camel-mina will continue and return a response to the client.
The respons is a duplicate of the in body.

A workaround is to set the out body to null immediately in your processor. If the body is
null before the exception is thrown then camel-mina will no return a response.

To reproduce the bug see the MinaTcpWithInOutUsingPlainSocketTest and remove the setbody null
code below and the test should fail.
 else if ("force-exception".equals(in)) {
                            // clear out before throwing exception
                            throw new IllegalArgumentException("Forced exception");

In MinaConsumer there is a TODO comment where the bug should be handled (from CAMEL-356)

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

View raw message