Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8173375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:07:42+00:00 2026-06-06T22:07:42+00:00

I am building a proof of concept for using Apache Camel. I am trying

  • 0

I am building a proof of concept for using Apache Camel. I am trying to build a route that will call the stored procedure on a Sybase DB using JDBC component and then process its multiple results sets.

So far, I have the following configuration using Spring:

<camelContext id="context">
    <route>
        <from uri="direct:start"/>
        <bean ref="sqlStatementCreator"/>
        <to uri="jdbc:dataSource?resetAutoCommit=false"/>
        <bean ref="sqlResultsProcessor"/>
    </route>
</camelContext>

The sqlStatementCreator is a simple class with only one method that returns String containing the sql statement to execute stored procedure:

{call sp_name ('some arg')}

The stored procedure returns 2 (or more) result sets with the data that I need.

The question is how to access those results sets in the sqlResultsProcessor?

The documentation for JDBC components states that “the result is returned in the OUT body as an ArrayList>”. That works perfectly if stored procedure returns only one result set. However, in case of multiple result sets when I check the Exchange’s body in the sqlResultsProcessor I have null.

  • Maybe the Camel cannot return multiple results sets in the OUT body with JDBC component?
  • Maybe it is better to write a custom bean to access the DB that will
    process results and put them into the OUT body?
  • Or maybe I am completely missing something?

Apache Camel version is 2.9.2.

I had to add the resetAutoCommit=false option to the jdbc component, because otherwise the exception was thrown by Sybase:

com.sybase.jdbc3.jdbc.SybSQLException: Stored procedure 'sp_name' may be run only in unchained transaction mode.

And I cannot change the stored procedure. It is the way it is.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T22:07:44+00:00Added an answer on June 6, 2026 at 10:07 pm

    As I have found out myself, Apache Camel (v.2.9.0) currently does not support processing of multiple results sets with JDBCProducer. As you can see in the source code of JDBCProducer in the processingSql* methods:

    if (stmt.execute(sql)) {
        rs = stmt.getResultSet();
        setResultSet(exchange, rs);
    }
    

    After executing SQL statement producer gets first ResultSet and sets it to Exchange.

    Therefore, if you need to process multiple ResultSets it is better to write your own bean that will execute SQL and process its results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a simple proof-of-concept for an iPad-specific website that would use video transitions
I am building a proof of concept application before it gets rollout to the
building a site using PHP and MySQL that needs to store a lot of
I'm building a simple app with Knockout.js as a proof of concept. As I'm
I'm trying to get a proof-of-concept PivotViewer application up and running, but I can't
I am building application that required some data from iPhone's Call log(read only). The
As a proof of concept, I'm building this extremely simple Twitter Friends crawler. Here's
Building a proof-of-concept web site for a group project. Regarding usernames we would like
Total beginner in WPF so bear with me. I building a proof of concept
I am building a script that will handle data that is sent to it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.