Create and configuring a data source using the administrative console

After you create a JDBC provider, create a data source to access the backend data store. Follow these steps to create either a new Version 5.0 data source or a Version 4.0 data source.

  1. Open the administrative console.

  2. Click Resources > JDBC Providers.

  3. You might need to change the Scope selection to find the JDBC provider for which you want to create a data source.Scope settings are used to limit the availability of resources to a particular cell, node, or server. When new items are created in this view, they are created within the current scope.

  4. Choose the JDBC resource provider in which you want to create the data source.The detail page for this provider appears.

  5. Click Data Sources in Additional Properties if you want to create a V5 data source. If you want to create a Version 4.0 data source, click Data Sources (Version 4) in Additional Properties. The Data Sources or Data Sources (Version 4) page appears.

  6. Click New to display the settings page for your V5.0 or V4.0 data source.

  7. Enter the properties for your data source.

    For your V5 data source...

    • Optionally choose an existing Component-managed Authentication Alias or Container-managed Authentication Alias from the lists. These aliases are used for database authentication in run time. If you do not set one of these fields and your database requires the user ID and password to get a connection, then you receive an exception during run time.

      If your resource authentication (res-auth) is set to Application, set the alias in the Component-managed Authentication Alias. If your res-auth is set to Container, set the Container-managed Authentication Alias. If your database does not support a user ID and password on a connection (for example, Cloudscape), then do not specify the alias in either one of these entries.

      Because defining a user ID and password in the Custom Properties page is not always desirable (your password can be seen by anyone who accesses the resources.xml file), you can define the user ID and password as an alias. To define a new alias from the J2C Authentication Data Entries choice, follow these steps:

      1. Click Apply. The J2C Authentication Data Entries choice does not appear on the "New" data source page, but does appear on an existing data source's page. Because you were just creating a new data source, click on the apply button for the J2C Authentication Data Entries choice to show. This also saves the properties that you have already applied to this data source.

      2. Click J2C Authentication Data Entries in the Related Items section.

      3. Click New on the J2C Authentication Data Entries page.

      4. Fill in the fields on the resulting page. Click Apply.

      5. Return to the data source page.

      6. If the new alias does not appear in the picklists for Component- or Container-managed Authentication Alias, close the page and re-open it.

    For more information, see Data source settings, Data source (Version 4) settings., and Minimum required properties for vendor-specific data sources

  8. Click Apply to view a page with your new data source settings. Note that there are now Additional Properties and Related Items sections on this page. Additional Properties contains the Connection Pool and Custom Properties choices. Some database vendors might require additional custom properties for data sources that access the database. Click on either or both of these to modify their properties.

    The Related Items section contains the J2C Authentication Data Entries choice. Here, you can specify a list of user IDs and passwords for use by Java 2 Connector (J2C) security.

  9. Click Save.

  10. Return to the data source page to confirm that your new data source appears in the list.


See Also

Binding to a data source
Data sources
JDBC providers
Security of lookups with component managed authentication
Data Source collection
Custom Properties collection
Use the JME API to create a JDBC driver and data source for bean-managed persistence, session beans, or servlets
Use the JME 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 (Version 4) settings
Connection pool settings