Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 94CE7F97D for ; Mon, 8 Apr 2013 14:35:39 +0000 (UTC) Received: (qmail 80450 invoked by uid 500); 8 Apr 2013 14:35:39 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 80413 invoked by uid 500); 8 Apr 2013 14:35:39 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Delivered-To: moderator for dev@camel.apache.org Received: (qmail 51694 invoked by uid 99); 8 Apr 2013 14:27:57 -0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.26 is neither permitted nor denied by domain of qetoom@gmail.com) Date: Mon, 8 Apr 2013 07:27:31 -0700 (PDT) From: yazan To: dev@camel.apache.org Message-ID: <1365431251710-5730509.post@n5.nabble.com> Subject: JDBC component handling large results MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org The JDBC component currently reads all the rows returned by a query in one shot, this only works for small resultsets. I'm trying to modify the component to support cursor semantics, so it reads only X numbers of rows, sets the rows in a new exchange's body and forwards it, rinse repeat until all the rows returned from a query are processed. The JDBC component only create a producer that executes a sql statement it received in a body of an exchange. My question is about the best approach to do this "1 exchange" to a "series of exchanges" mapping, My research lead me to MulticastProcessor it seems that I should make JDBCProducer extend it and then override createProcessorExchangePairs to create an Iterable that actually reads rows from the resultset to populate each new exchange, Am I on the right track here? -- View this message in context: http://camel.465427.n5.nabble.com/JDBC-component-handling-large-results-tp5730509.html Sent from the Camel Development mailing list archive at Nabble.com.