Workingwith JDBC Connection Pools
AJDBC connection pool is a group of reusable connections for a particular database. When
creatingthe pool with the Admin Console, the Administrator is actually dening the aspects of
aconnection to a specic database.
Beforecreating the pool, you must rst install and integrate the JDBC driver. When building
theCreate Connection Pool pages, certain data specic to the JDBC driver and the database
vendormust be entered. Before proceeding, gather the following information:
Databasevendor name
Resourcetype, such as javax.sql.DataSource (local transactions only)
javax.sql.XADataSource(global transactions)
Datasource class name
Requiredproperties, such as the database name (URL), user name, and password

Creatinga JDBC Connection Pool

Youcan use the Admin Console for creating the JDBC connection pool.
Creatinga JDBC Connection Pool and JDBC Resource Using the Admin

Console

Copythe JDBC driver for database connectivity to as-install/domains/domain_name/lib/ext.
Alternatively,addthe path to the JDBC driver to classpath-prefix and restart the server.
Inthe Admin Console, click CreateJDBC Connection Pool in the Common Tasks page.
Providea name for the connection pool, select the resource type, select the database vendor.
ClickNext.
TheAdmin Console lists the default pool settings and the properties of datasource class
providedby the vendor.
Clickthe Ping button to test the JDBC connection pool.
Inthe left-hand pane of the Admin Console, click Resources > JDBC Resources.
ClickNew.
Inthe New JDBC Resource page, provide the JNDI name for the resourceand the JDBC
comnnectionpool with which the JDBC resource needs to be associated.
1
2
3
4
5
6
7
8
WorkingwithJDBC Connection Pools
SunGlassFishEnterprise Ser ver2.1 Administration Guide • December 200846