JDBC for SQL Server - Herong's Tutorial Examples - v3.14, by Herong Yang
What Is Database Connection Pool
This section provides a quick introduction on database connection pool, which is an object container managing a set of JDBC connection objects to be reused to avoid repeated connection opening and closing operations.
What Is Database Connection Pool? - A Database Connection Pool is an object container that manages a set of JDBC connection objects to be reused to avoid repeated connection opening and closing operations.
There two main situations where you should consider using JDBC pooled connections:
The JDBC API 3.0 and newer versions provide a general interface for connection pooling with 3 primary classes:
The actual implementation of the Connection Pool interface will be done by JDBC drivers or third party libraries.
Commonly used third party Connection Pool libraries are:
Commons DBCP - A JDBC database connection pool library developed by Apache See Commons DBCP Website at https://commons.apache.org/proper/commons-dbcp.
C3P0 - A mature and highly concurrent JDBC Connection pooling library developed by Steve Waldman. See C3P0 GitHub Website at https://github.com/swaldman/c3p0.
Table of Contents
JDBC (Java Database Connectivity) Introduction
Microsoft SQL Server Express Edition
Microsoft JDBC Driver for SQL Server
Microsoft JDBC Driver - Query Statements and Result Sets
Microsoft JDBC Driver - DatabaseMetaData Object
Microsoft JDBC Driver - DDL Statements
Microsoft JDBC Driver - DML Statements
SQL Server - PreparedStatement
SQL Server CLOB (Character Large Object) - TEXT
SQL Server BLOB (Binary Large Object) - BLOB
►Using Connection Pool with JDBC
►What Is Database Connection Pool
Commons DBCP for Connection Pooling
Connection Pooling with Commons DBCP BasicDataSource
Connection Pooling with Commons DBCP PoolingDriver
Connection Pooling with C3P0 ComboPooledDataSource
Connection Pooling with C3P0 DataSources
JDBC-ODBC Bridge Driver - sun.jdbc.odbc.JdbcOdbcDriver
JDBC-ODBC Bridge Driver - Flat Text Files
JDBC-ODBC Bridge Driver - MS Access