Skip Headers

Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Configuring Database Login Connection Options

You configure connection information at the session level for a non-CMP TopLink application. This information is stored in the `sessions.xml` file. The TopLink runtime uses this information whenever you perform a persistence operation using the session in your non-CMP TopLink application.

This connection configuration overrides the connection information at the project level, if configured. For more information about project-level configuration, see "Configuring Development and Deployment Logins".

This connection configuration is overridden by the connection information at the connection pool level. For more information, see "Configuring Connection Pool Connection Options".

## Using TopLink Workbench

To specify the connection options for a relational server (or database) session login, use this procedure:

1. Select a relational server (or database) session in the Navigator. Its properties appear in the Editor.

2. Click the Login tab. The Login tab appears.

3. Click the Connection subtab. The Connection subtab appears.

   Figure 86-2 Login Tab, Connection Subtab, Database Driver

   Description of "Figure 86-2 Login Tab, Connection Subtab, Database Driver"

   Figure 86-3 Login Tab, Connection Subtab, J2EE Datasource

   Description of "Figure 86-3 Login Tab, Connection Subtab, J2EE Datasource"

4. Complete each field on the Connection subtab.

Use the following information to enter data in the driver fields on the tab:

Field | Description
--- | ---
Database Driver | Specify the appropriate database driver: Driver Manager: specify this option to configure the driver class and URL used to connect to the database. In this case, you must configure the Driver Class and Driver URL fields. J2EE Data Source: specify this option to use a J2EE data source already configured on your target application server. In this case, you must configure the Datasource Name field. NOTE: If you select J2EE Datasource, you must use external connection pooling. You cannot use internal connection pools with this Database Driver option (for more information, see "Configuring External Connection Pooling").
Driver Class Foot 1 | Configure this field when Database Driver is set to Driver Manager. Select from the menu of options. This menu includes all JDBC drivers in the TopLink classpath.
Driver URL Footref 1 | Configure this field when Database Driver is set to Driver Manager. Select from the menu of options relevant to the selected Driver Class, and edit the URL to suit your data source.
Data Source Name Foot 2 | Configure this field when Database Driver is set to J2EE Datasource. Specify any valid JNDI name that identifies the J2EE data source preconfigured on your target application server (example: `jdbc/EmployeeDB`). By convention, all such names should resolve to the JDBC subcontext (relative to the standard `java:comp/env` naming context that is the root of all provided resource factories).

Footnote 1 Applicable only when Database Driver is set to Driver Manager.

Footnote 2 Applicable only when Database Driver is set to J2EE Datasource.