Sun Java System Web Server 6.1 SP11 Administrator's Guide

Creating a JDBC Resource

A JDBC resource, also called a data source, lets you make connections to a database using getConnection(). Create a JDBC resource in one of these ways:

Using the Administration Interface

To create a JDBC resource using the Administration interface, perform these tasks

ProcedureTo create a JDBC resource using the Administration interface

  1. Access the Server Manager and choose the Java tab.

  2. Click JDBC Resources.

  3. Click the New button.

  4. Enter the following information:

    • JNDI Name (required). Enter the JNDI name that application components must use to access the JDBC resource.

    • Pool Name (required). Select from the list the name (or ID) of the connection pool used by this JDBC resource. For more information, see Creating a New JDBC Connection Pool.

  5. To enable the JDBC resource, select On from the Data Source Enabled drop-down.

    If a JDBC resource is disabled, no application component can connect to it, but its configuration remains in the server instance.

  6. Click OK.

  7. Click Apply Changes.

Using the Command Line Interface

For information on how to use the command-line interface to create a new JDBC resource, see Create JDBC Resource in Appendix A, Command Line Utilities.