Skip Headers

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

Previous | Next |

# Configuring TopLink for Oracle JDeveloper

This section contains information on how to configure TopLink for use with Oracle JDeveloper. JDeveloper is a J2EE development environment with end-to-end support to develop, debug, and deploy e-business applications and Web services.

## Using TopLink Mappings

Starting with Oracle JDeveloper 10g, the standard JDeveloper installation includes an embedded TopLink editor. Refer to the JDeveloper documentation for complete information.

To use TopLink with JDeveloper 9.0.4 (and earlier), use the following procedure to add the TopLink JAR files to your JDeveloper projects:

1. Select a JDeveloper project in the System Navigator window.

2. Choose Project > Project Settings. The Project Settings window appears.

3. Choose Configurations > Development > Libraries. A list of predefined and user-defined libraries appears.

   Figure 4-1 List of Available Libraries

   Description of "Figure 4-1 List of Available Libraries"

4. Click New to create a new library that will contain the TopLink `.jar` files. The New Library dialog box appears.

5. Enter a name for the new library–for example, TopLink. Ensure that the default choice for Location remains as User Libraries.

   Figure 4-2 Creating a New Library Dialog Box

   Description of "Figure 4-2 Creating a New Library Dialog Box"

6. To edit the Class Path and add the TopLink `.jar` files, click Edit.

   Add the following to the beginning of your Class Path:

       <ORACLE_HOME>\toplink\jlib\toplink.jar
       <ORACLE_HOME>\toplink\jlib\antlr.jar
       <ORACLE_HOME>\lib\xmlparserv2.jar
       <ORACLE_HOME>\lib\xml.jar

7. Click OK. On the Project Settings window click OK.

Using an Existing User-Defined TopLink Library

After a user library is created, it can be referenced again by any other project. Revisit the Libraries window of the Project Settings, and add the TopLink Library to any project with which you want to use TopLink.

## Using TopLink Sessions

When using TopLink 10g Release 3 (10.1.3) with Oracle JDeveloper, you should be aware that you cannot configure all `sessions.xml` options with the JDeveloper mapping editor.

To configure supported options (prior to 10g Release 3 (10.1.3), use the JDeveloper mapping editor. Refer to the JDeveloper online help for details.

`http://www.oracle.com/technology/documentation/9i_jdev.html`

To configure the new TopLink 10g Release 3 (10.1.3) options, including, Cache coordination options (see Chapter 91, "Configuring a Coordinated Cache"), Historical sessions (see Chapter 81, "Configuring Historical Client Sessions"), and Connection policy for server sessions (see "Configuring Connection Policy") use one of the following methods:

- Use a `SessionEventListener.preLogin(SessionEvent)` method

- When accessing the session from the session manager, request it with the `loggedIn` option set to false. The returned session can then be customized and you can invoke login.