Skip Headers

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

Previous | Next |

# Configuring Properties

For all `DatasourceLogin` types, you can specify custom named values, called properties. Some data sources require additional, driver-specific properties not supported in the `DatasourceLogin` API (for example, see "JDBC Driver Properties Optimization"). Add these properties to the `DatasourceLogin` so that TopLink can pass them to the driver.

For relational sessions, you must first enable advanced option Use Properties (see "Configuring Advanced Options").

For EIS sessions, properties are always enabled.

Note: Do not set a password as a property. Always use TopLink Workbench or `DatabaseLogin` method `setPassword`. For more information on configuring a password, see "Configuring User Name and Password".

When using TopLink Workbench, you can only set character values, which TopLink returns as `String` objects (see "Using TopLink Workbench").

When using Java, you can set any `Object` value (see "Using Java").

## Using TopLink Workbench

To specify arbitrary named value pairs that TopLink associates with a `DatasourceLogin`, use this procedure:

To add (or change) a new Name/Value property, click Add (or Edit). Add Property dialog box appears.

Use the following information to add or edit a login property on the Add Property dialog box:

Option | Description
--- | ---
Name | The name by which TopLink retrieves the property value using the `DatasourceLogin` method `getProperty`.
Value | The value TopLink retrieves using the `DatasourceLogin` method `getProperty` passing in the corresponding property name. Using TopLink Workbench, you can set only character values that TopLink returns as `String` objects.

To delete an existing property, select the Name/Value row and click Remove.

## Using Java

Using Java, you can set any `Object` value using `DatasourceLogin` method `setProperty`. To remove a property, use `DatasourceLogin` method `removeProperty`.