JDBC for Oracle - Herong's Tutorial Examples
∟Using Connection Pool with JDBC
This chapter provides tutorial examples on JDBC connection pooling. Topics include introduction to database connection pool; examples of using DBCP and C3P0 Java libraries.
What Is Database Connection Pool
Commons DBCP for Connection Pooling
Connection Pooling with Commons DBCP BasicDataSource
Connection Pooling with Commons DBCP PoolingDriver
C3P0 for Connection Pooling
Connection Pooling with C3P0 ComboPooledDataSource
Connection Pooling with C3P0 DataSources
Takeaways:
- Database Connection Pool manages
a set of JDBC connection objects to be reused to avoid
repeated connection opening and closing operations.
- Commons DBCP is a popular open source JDBC database connection pool library developed by Apache.
- The easiest way to use Commons DBCP library for connection pooling is to use the
org.apache.commons.dbcp2.BasicDataSource class.
- C3P0 is a mature and highly concurrent JDBC Connection pooling library
developed by Steve Waldman.
- The easiest way to use C3P0 library for connection pooling is to use the
com.mchange.v2.c3p0.ComboPooledDataSource class.
Table of Contents
About This Book
JDBC (Java Database Connectivity) Introduction
JDK (Java SE) Installation
Oracle Express Edition Installation on Windows
Oracle JDBC Drivers
Oracle - Reference Implementation of JdbcRowSet
Oracle - PreparedStatement
Oracle - JBDC CallableStatement
Oracle CLOB (Character Large Object) - TEXT
Oracle BLOB (Binary Large Object) - BLOB
►Using Connection Pool with JDBC
Archived Tutorials
References
Full Version in PDF/EPUB