Working With Jdbc Connection Pools; Creating A Jdbc Connection Pool - Sun Microsystems GlassFish Enterprise Server 2.1 Administration Manual

Hide thumbs Also See for GlassFish Enterprise Server 2.1:
Table of Contents

Advertisement

Working with JDBC Connection Pools

Working with JDBC Connection Pools
A JDBC connection pool is a group of reusable connections for a particular database. When
creating the pool with the Admin Console, the Administrator is actually defining the aspects of
a connection to a specific database.
Before creating the pool, you must first install and integrate the JDBC driver. When building
the Create Connection Pool pages, certain data specific to the JDBC driver and the database
vendor must be entered. Before proceeding, gather the following information:

Creating a JDBC Connection Pool

You can use the Admin Console for creating the JDBC connection pool.
Creating a JDBC Connection Pool and JDBC Resource Using the Admin
Console
Copy the JDBC driver for database connectivity to as-install/domains/domain_name/lib/ext.
1
Alternatively, add the path to the JDBC driver to classpath-prefix and restart the server.
In the Admin Console, click Create JDBC Connection Pool in the Common Tasks page.
2
Provide a name for the connection pool, select the resource type, select the database vendor.
3
Click Next.
The Admin Console lists the default pool settings and the properties of datasource class
4
provided by the vendor.
Click the Ping button to test the JDBC connection pool.
5
In the left-hand pane of the Admin Console, click Resources > JDBC Resources.
6
Click New.
7
In the New JDBC Resource page, provide the JNDI name for the resource and the JDBC
8
comnnection pool with which the JDBC resource needs to be associated.
46
Sun GlassFish Enterprise Server 2.1 Administration Guide • December 2008
Database vendor name
Resource type, such as javax.sql.DataSource (local transactions only)
javax.sql.XADataSource (global transactions)
Data source class name
Required properties, such as the database name (URL), user name, and password

Advertisement

Table of Contents
loading

Table of Contents