Categories
discuss

How to use Java JDBC connection pool?

I want to use a JDBC connection pool. The most important factor is that it’s easy-to-use and bug-free. What is suitable for me?

I want to use a JDBC connection pool. The most important factor is that it’s easy-to-use and bug-free. What is suitable for me?

Answer

Another fine alternative is the Apache Database Connection Pool.

Instead of getting a connection using DriverManager, you’ll use a JNDI naming service to get your connection out of the pool.

Be sure to close your resources – Connection, Statement, and ResultSet. If you don’t, your pool will be quickly exhausted.

Source: stackoverflow
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Privacy Policy, and Copyright Policy. Content is available under CC BY-SA 3.0 unless otherwise noted. The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 © No Copyrights, All Questions are retrived from public domain..