Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 94227 invoked from network); 17 Feb 2008 16:58:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Feb 2008 16:58:50 -0000 Received: (qmail 12067 invoked by uid 500); 17 Feb 2008 16:58:45 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 12049 invoked by uid 500); 17 Feb 2008 16:58:45 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 12031 invoked by uid 99); 17 Feb 2008 16:58:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Feb 2008 08:58:45 -0800 X-ASF-Spam-Status: No, hits=-1999.8 required=10.0 tests=ALL_TRUSTED,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Feb 2008 16:58:13 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 41A43234C040 for ; Sun, 17 Feb 2008 08:58:16 -0800 (PST) Message-ID: <196494488.1203267496259.JavaMail.jira@brutus> Date: Sun, 17 Feb 2008 08:58:16 -0800 (PST) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Updated: (CAMEL-340) Mina TCP does not support InOut pattern In-Reply-To: <1353552812.1203267375810.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated CAMEL-340: ------------------------------ Attachment: MinaTcpWithInOutUsingPlainSocketTest.java And the unit tests for the patch. To demonstrate the original bug use this unit test. It is a test that uses a plain socket client to send a message to Camel and wait for the response. > Mina TCP does not support InOut pattern > --------------------------------------- > > Key: CAMEL-340 > URL: https://issues.apache.org/activemq/browse/CAMEL-340 > Project: Apache Camel > Issue Type: Bug > Components: camel-mina > Affects Versions: 1.2.0 > Reporter: Claus Ibsen > Attachments: camel_340_patch.txt, MinaTcpWithInOutUsingPlainSocketTest.java > > > See this thread: > http://www.nabble.com/camel-mina-TCP-InOut-exchange-td15530602s22882.html > This builder does not support InOut when a client send a textline to localhost:8888. > The client never receives a response. > url = "mina:tcp://localhost:8888?textline=true"; > from(uri).process(new Processor() { > public void process(Exchange e) { > String in = e.getIn().getBody(String.class); > // append newline at end to denote end of data for textline codec > e.getOut().setBody("Hello " + in + "\n"); > } > }); > Attached is a patch that fixes this by introducing a new parameter to the URL for fluent builder sync=true (ie is there a better name?) > Using this url instead and the patch then Camel will send a response back to the client: > mina:tcp://localhost:8888?textline=true&sync=true -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.