camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yazan <qet...@gmail.com>
Subject JDBC component handling large results
Date Mon, 08 Apr 2013 14:27:31 GMT
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<ProcessorExchangePair>
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.

Mime
View raw message