JDBC Connection Pools

Sun ONE Application Server supports pooled connections to databases. To use the connection pool, you first create a JDBC connection pool definition and register it to the Sun ONE Application Server instance; each pool definition results in a physical pool that instantiates at server start-up. More than one JDBC data source can point to the same pool, which means that the JDBC data sources will be using the same pool of connections at run time.

Creating a JDBC Connection Pool Definition

To create a JDBC connection pool definition:

  1. In the Explorer's Runtime tab, expand the Server Registry and expand Installed Servers and expand Sun ONE Application Server 7 node.

    note  If you do not see any Administration Server nodes, the Administration Server of the Sun ONE Application Server must be added under the Installed Servers subnode of the Server Registry node. See here for more information.

  2. Right-click the Unregistered JDBC Connection Pools node and choose Add new JDBC Connection Pool.
  3. Enter properties for the JDBC connection pool definition. See JDBC Connection Pool Property Sheet for more information.
  4. Once the definition is created, you must register it to the application server instance where you want to create the JDBC connection pool. See Registering a JDBC Connection Pool Definition for more information.

Registering a JDBC Connection Pool Definition

To register a JDBC connection pool definition to an application server instance:

  1. In the Explorer's Runtime tab, expand the Server Registry and expand Installed Servers and expand Sun ONE Application Server 7 and expand Unregistered JDBC Connection Pools node.
  2. Select the JDBC connection pool definition that you want to register and choose Register. The Select Server to Register to dialog box opens.
  3. Select the application server instance where you want to create the JDBC connection pool and click Register. The Information dialog box opens.
  4. Click OK to close the Information dialog box.
  5. Click OK to close the Select Server to Register to dialog box.
  6. To see the new JDBC Connection Pool, expand the application server instance and expand Registered JDBC Connection Pools node.

Deleting a JDBC Connection Pool

To delete a JDBC connection pool from an application server instance:

  1. In the Explorer's Runtime tab, expand the Server Registry and expand Installed Servers and expand Sun ONE Application Server 7 and expand Administration Server and expand application server instance and expand Registered JDBC Connection Pools node.
  2. Right-click the JDBC connection pool and choose Delete.
  3. When the application server instance is restarted, the JDBC connection pool is removed. See Server Instance for stopping and starting the application server instance.

See also
   JDBC Connection Pool Property Sheet
Registering a Resource
Server Instance

Legal Notices