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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:33:49+00:00 2026-05-15T15:33:49+00:00

From the examples that I have read and from the documentation on MysqlConnectionPoolDataSource at

  • 0

From the examples that I have read and from the documentation on MysqlConnectionPoolDataSource at http://www.control.auc.dk/~04gr733/filer/javadoc-DB-driver/com/mysql/jdbc/jdbc2/optional/MysqlConnectionPoolDataSource.html it seems that Java SE applications cannot use connection pooling. Is this true? Can I get connection pooling to work for MySql?

Does the same go for PreparedStatement pooling?

UPDATE:
I came across the following from the MySQL website with regards to their connection pooling.

    /*
     * Create a JNDI Initial context to be able to
     *  lookup  the DataSource
     *
     * In production-level code, this should be cached as
     * an instance or static variable, as it can
     * be quite expensive to create a JNDI context.
     *
     * Note: This code only works when you are using servlets
     * or EJBs in a J2EE application server. If you are
     * using connection pooling in standalone Java code, you
     * will have to create/configure datasources using whatever
     * mechanisms your particular connection pooling library
     * provides.
     */

This is what has made me look at a way to get this right for a Java SE application. But re-re-reading it, it seems to me that they are making reference to the manner in which you obtain a reference to the datasource. Could I not use a dependency injection framework or manual insert a dependency on the datasource for my DAO object? I am going to give that a try.

  • 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-05-15T15:33:50+00:00Added an answer on May 15, 2026 at 3:33 pm

    You could use some third party Connection Pool for JDBC such as:
    BoneCP , C3P0 or DBCP

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

Sidebar

Related Questions

Can someone please derive a concrete example from the following: http://www.urdalen.com/blog/?p=210 ..that shows how
I am just learning NHibernate. I have been using examples from the documentation and
I have seen examples of printing from a windows application but I have not
Recently I've read, and implemented 80% of examples from Pro ASP.NET MVC Framework ,
I have an application that receives a pointer to JPEG data from a camera
I have a question about error/exception handling on the iPhone. I've read the documentation
I have searched the web and read through the Boost documentation about shared_ptr .
Solution: I've misinterpreted the example from SQL Books Online. Yes, that below the section
What are the things that Medium Trust stops you from doing? For example, I've
I've created an Access 2007 form that displays, for example, Products from a Product

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.