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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:09:34+00:00 2026-06-11T21:09:34+00:00

Connection pooling is normally managed by the application server right? But we can add

  • 0

Connection pooling is normally managed by the application server right? But we can add a context.xml in META-INF folder and configure data source there now.

  1. Is that a good approach? Even in this case even we have the configuration in our application, server will pick up those configurations and manage the pooling right?

    I have notices when i don’t close the connection it returns different connection objects. And if i close the connection it does return the same connection object GenericObjectPool.numActive shows 1 in this case. But when i dont close connections it also returns the connection objects to the pool right? Because i see GenericObjectPool.numActive keep increase for each request.

  2. My second question is though i don’t close the connection still those are returned to the connection pool now? so even after request is fulfilled, why is the server not picking that connection object and instead creating a new one?

  • 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-11T21:09:36+00:00Added an answer on June 11, 2026 at 9:09 pm

    If you don’t close a connection, it won’t return to the pool. A connection must ALWAYS be closed, in a finally block, by the method which got it from the pool.

    Your server or pool might have means to detect that a connection has not been closed, but isn’t used anymore, and thus return it to the pool, but you can’t rely on such a mechanism.

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

Sidebar

Related Questions

I am supposed to use JBoss connection pooling for my application.Right now I don't
Well, I managed get the delegate driver to set up properly, but connection pooling
I am using hibernate 3.2.2 in my application. For connection pooling, we are using
We have a connection pooling component (JAR file) for one of our application. As
Should I write my own connection pooling scheme? (Question rewritten again so I can
How can I disable default connection pooling on Tomcat? Is there any Resource parameter
I have an application that I use BoneCP for connection pooling and when I
Currently I'm using a separate DBConnectionManager class to handle my connection pooling, but I
In my application I am using c3p0 for connection pooling. I provide the username
I am developing a java web Application and I use Tomcat connection pooling, here

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.