Create and configure a data source using the administrative console

 

Overview

After you create a JDBC provider, create a data source to access the backend data store. Application components use the data source to access connection instances to your database; a connection pool is associated with each data source. The product supports two different versions of data source:

  • V4.0, for use with the EJB 1.0 specification and the Java Servlet 2.2 specification

  • The latest standard version for use with more advanced releases of these specifications

 

Procedure

  1. Open the administrative console.

  2. Click Resources > JDBC Providers.

  3. Choose the JDBC resource provider under which you want to create your data source. The detail page for this provider is displayed.

  4. Under Additional Properties, click the Data Sources link that is appropriate for your application. The Data sources or Data sources (V4) page is displayed.

  5. Click New to display the Data source settings page.

  6. Verify that all the required properties have valid values.

    For data sources of the latest standard version:

    1. Select a DataStoreHelper class name from the list entitled DataStoreHelpers provided by WebSphere Application Server, or leave the default selection as is. If you want to use a data store helper other than those available in the drop-down list, click Specify a user-defined DataStoreHelper. Type a fully qualified class name in the field provided.

    2. The next section of properties varies according to the database selection, provider type, and implementation that you chose for your JDBC provider. These properties are either required or highly recommended for your data source. Provide valid values for these settings if you do not want to accept the default values.

    3. Click Component-managed Authentication Alias if your database requires a user ID and password for a connection. This alias is used only when the application resource reference is using res-auth = Application.

      Important:(For components with res-auth=Container) Both the Container-managed Authentication Alias and Mapping-Configuration Alias settings are deprecated. They are superseded by the specification of a login configuration on the resource-reference mapping at deployment time. You must now use this login setting to define the aliases at deployment.

    4. If you chose XA Data Source as the implementation type of your JDBC provider, we need to specify the alias used during transaction recovery processing. An additional section entitled Authentication Alias for XA Recovery is available. Select either Use Application Authentication Alias to use the same value that you chose for component-managed authentication, or select Specify: to choose a different alias from the drop-down list.

  7. Click Apply to view a page with your new data source settings. Additional properties and Related items sections are now available on this page. Additional properties contains the Connection pool, Custom properties, and WAS data source properties choices. (If you are using a V4 data source, however, you see only the first two choices.)

    1. Click on the first link to define settings that affect the behavior of the Java 2 Connector (J2C) connection pool manager.

    1. Go to the Custom properties page to view and modify additional properties that the database vendor might require for the connection of its product to an application server.

    2. Use the WebSphere Application Server data source properties page to input settings that exclusively affect the WAS connection to the database.

    3. The Related items section (applicable only to later version data sources, not V4 data sources) contains the J2C Authentication data entries choice. Here, one can specify a list of user IDs and passwords for J2C security to use.

  8. Click Save.

  9. Return to the data source page to confirm that your new data source is displayed in the list.

 

What to do next

You are now ready to install the application for which you configured the data sources. During installation, one can bind resource references to these data sources.

 

See also


Data source collection
Data sources (V4)
Custom properties collection
Custom Properties (V4) collection

 

See Also


Binding to a data source
Data sources
JDBC providers
Security of lookups with component managed authentication

 

See Also


WebSphere Application Server data source properties collection
Example: Using the Java Management Extensions API to create a JDBC driver and data source for bean-managed persistence, session beans, or servlets
Example: Using the Java Management Extensions API to create a JDBC driver and data source for container-managed persistence
Vendor-specific data sources minimum required settings
Data source settings
Data source (V4) settings
Connection pool settings