Oracle TopLink Developer's Guide
10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
This section describes how to designate a defined login's role. For information on how to define a login, see "Configuring Login Information". TopLink recognizes the following login roles:
Development Role
While using TopLink Workbench to develop a project (see "Development Role: Development Login"), you must define a login (see "Configuring Login Information") and designate it as the development login. The development login is stored in the TopLink project file. TopLink Workbench uses the information in the development login whenever you perform a data source operation from within TopLink Workbench. For example, when you read or write schema information from or to a data source during application development, the development login information is never written to a sessions.xml
or project.xml
file and is overridden by the deployment login (or the session login) at run time.
For more information on how to use a development login to connect to a database, see "Logging in to the Database".
CMP Deployment Role
If you are creating a CMP project (see "CMP Deployment Role: Deployment Login"), you may define a run-time login (see "Configuring Login Information") and designate it as the deployment login. This is the login that the application will use at run time, unless overridden in the sessions.xml
file, CMP deployment file, or through Java code.
Non-CMP Session Role
If you are creating a non-CMP project (see "Non-CMP Session Role: Session Login"), Oracle recommends that you use the sessions.xml
file to store the sessions your project uses at run time (see "Data Source Login Types").
To specify different development and deployment database logins, use this procedure:
Select the database object in the Navigator. The Database property sheet appears.
Figure 23-4 Database Property Sheet, Development and Deployment Login Options
Use this table to enter data in the following fields on the Database property sheet to configure the login:
Field | Description |
---|---|
Development Login | The Defined Login to be used by TopLink Workbench during development to connect with the database, and to read or write table information.
For more information on how to use a development login to connect to a database, see "Logging in to the Database". |
Deployment Login | The Defined Login to be used by your TopLink-enabled application during deployment. |
Using TopLink Workbench, after you create a login (see "Configuring Login Information") and specify it as a development login (see "Configuring Development and Deployment Logins"), you can log in to a database instance.
You must log in to the database before importing or exporting table information.
To log in to the database, use one of the following procedures:
Select the database object in the Navigator and click Login. TopLink Workbench logs in to the database.
Right-click on the database object in the Navigator and choose Log In to Database from the context menu, or choose Selected > Log In to Database from the menu.
The database icon in the Navigator window changes to indicate you are now logged in to the database.