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 9028789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:04:54+00:00 2026-06-16T07:04:54+00:00

We have a C3P0 pool as datasource, and we are using org.springframework.orm.hibernate4.LocalSessionFactoryBean as session

  • 0

We have a C3P0 pool as datasource, and we are using org.springframework.orm.hibernate4.LocalSessionFactoryBean as session factory.

Some of our (big) MySQL requests are configured to stream the result set.
However, MySQL only allow to stream a single result per connection.

That’s why I’m wondering if 2 different Hibernate session can use the same connection, or is it 1 connection = 1 session ?

  • 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-16T07:04:55+00:00Added an answer on June 16, 2026 at 7:04 am

    Just to complement JB Nizet’s answer: a connection is provided by the pool to the application (a Hibernate session, in this case). The application uses this connection and returns it to the pool. The pool will decide whether to discard this connection or to reuse it in the future for another session. So, two different sessions can end up using the same connection, but not at the same time.

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

Sidebar

Related Questions

I have some c3p0 pool encapsulated in a class that I use to execute
I build j2ee application using spring, hibernage-JPA and c3p0 for connection pool. I have
we are running java6/hibernate/c3p0/postgresql stack. Our JDBC Driver is 8.4-701.jdbc3 I have a few
I am worried that the properties I have set for my C3P0 connection pool
I have an application that is using Hibernate 3, c3p0, and spring 2.5.6. We
I am using hibernate and c3p0 for the database, and i have an java
I am using c3P0 in my system. I have design question related to changing
I have to upgrade my projects to start using Hibernate4 and Maven for the
I'm trying to build an app using Jersey, Rest, Tomcat, c3p0 etc. I have
I have a small application using Spring3, Hibernate4 and JSF2. So far in my

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.