Skip Headers

Build the sessions.xml File

Previous
Previous
 
Next
Next

Each TopLink project belongs to a TopLink session. A session is the facade through which an application accesses TopLink functionality. This session information is stored in the sessions.xml file.

For more information, see "Understanding TopLink Sessions" in Oracle Toplink Developer's Guide.

Show me...

  1. Select File > New > Sessions Configuration. TopLink adds a new sessions element in the Navigator.

  2. Right-click the sessions node in the Navigator and select New > Session. The Create New Session dialog appears. Use this table to enter data in each field on the dialog and click OK.

    Field Description
    Name Session
    Use Server Platform Do not select the Use Server Platform option.
    Select Data Source Select Database, then select your Platform (such as Oracle Database 10g).
    Select Session Select Database Session.

  3. On the General tab, select the Project subtab. In the Primary Project field, click Edit. The Edit Primary Project dialog appears.

  4. Select XML then click Browse and select the <INTRO_TUTORIAL_HOME>/src/META-INF/Intro_Tutorial.xml file that you created previously (in the "Export the Project Data" section). Click OK to close the Edit Primary Project dialog.

    Project Tab

    Project subtab on the General tab.
  5. Click the Login tab. Use this table to enter data in each field on the Login tab.

    Field Description
    Driver Platform Select your JDBC platform (such as Oracle Database 10g).
    Database Driver Select Driver Manager.
    Driver Class oracle.jdbc.OracleDriver
    URL jdbc:oracle:thin:@localhost:1521:XE
    Username scott
    Password tiger


    Note:

    This information should be identical to the login information you entered when you added the database to the project (see "Add the Database").

  6. Click the Logging tab. Select the Standard logging option.

  7. For the Logging Level, select Fine. This will allow you to review the generated SQL statements.

    Logging Tab

    Logging tab.
  8. Save the session to <INTRO_TUTORIAL_HOME>/src/META-INF/sessions.xml.