Oracle® Application Server TopLink Mapping Workbench User's Guide
10g Release 2 (10.1.2) Part No. B15900-01 |
|
Previous |
Next |
The OracleAS TopLink sessions configuration file (named sessions.xml
, by default) is an XML (extensible markup language) file that contains all sessions associated with a project. Each OracleAS TopLink project belongs to an OracleAS TopLink session. To deploy beans that belong to different projects, add an appropriate OracleAS TopLink session (see "Working with Sessions") to the configuration.
Refer to the Oracle Application Server TopLink Application Developer's Guide for a sample sessions.xml
configuration file.
The OracleAS TopLink Sessions Editor displays configurations and their contents in the Navigator pane. When you select a configuration, its attributes display in the Editor pane.
Use this procedure to create a new OracleAS TopLink session configuration.
To Create a New Configuration:
Description of the illustration newsesbt.gif
Click the Create New Configuration button on the toolbar. The Create New Session Configuration dialog box appears.
Enter the configuration Name (sessions.xml
by default), select a directory Location in which to save the file, enter a default Session Name, and click OK.
The OracleAS TopLink Sessions Editor appears, showing the configuration name in the Navigator pane.
Select the configuration element in the Navigator pane. The session's General tab appears in the Editor pane (see Figure 8–5 on page 8-8.
Use this procedure to open an existing session configuration.
To Open an Existing Configuration:
Description of the illustration openbtn.gif
Click the Open Configuration button on the toolbar. The Create New Session Configuration dialog box appears.
You can also choose File > Open from the menu.
The OracleAS TopLink Sessions Editor does not automatically save your project. Be sure to save your project often to avoid losing data.
To Save Your Configuration(s):
Description of the illustration savebtn.gif
Description of the illustration saveall.gif
Click the Save button or Save All button to save your project(s).
You can also choose File > Save, or File > Save All from the menu.
To Save Your Configuration with a Different Name or Location:
Description of the illustration saveasbt.gif
Click the Save As button or choose File > Save As. The Save As dialog box appears.
Browse to the directory in which to save the project. In the File Name field, type the name of the project and click Save.
Use session brokers to allow OracleAS TopLink to access multiple databases. With a session broker, you can store the objects within one application on multiple databases.
To Create a Session Broker
Select the configuration element in the Navigator pane. The session's General tab appears in the Editor pane.
Click the Sessions Broker tab. The Session Broker tab of the Session property sheet appears.
Description of the illustration sesbkbtn.gif
If the Session Broker tab is not visible for the session, click the Session Broker button on the Navigator toolbar. You can also create brokers by right-clicking on the configuration element in the Navigator pane and selecting Advanced > Session Brokers from the pop-up menu.
Figure 8-4 Configuration – Session Broker Property Sheet
Figure 8–4 calls out the following user-interface components:
Click Add in the Session Broker area to create a new session broker.
To delete a session broker, select the session broker and click Remove. To rename a session broker, select the session broker and click Rename (see "Renaming Elements").
Note: Each session broker must contain at least one session. |
To create a new session, select a session broker, then click Add in the Session area to create a new session for the selected session broker.
To delete a session, select the session and click Remove. To rename a session, select the session and click Rename (see "Renaming Elements").
A OracleAS TopLink session describes how OracleAS TopLink communicates with the datasource at runtime. When using the OracleAS TopLink Sessions Editor to configure the session options, choose Default to use the values specified in the Oracle Application Server TopLink Foundation Library. Refer to the Oracle Application Server TopLink Application Developer's Guide for more information.
Use one of the following methods to create a new session:
Right-click on a configuration element in the Navigator pane and choose New > Session from the pop-up menu.
Description of the illustration sessbtn.gif
Select a configuration element in the Navigator pane and click the Session button.
Create a new session for the session broker (see "Working with Session Properties").
Each session contains tabs and specific properties. By default, sessions contain the following properties:
General
Logging
In addition, you can specify advanced properties (see "Working with Advanced Session Properties") for each session.
Select the session element in the Navigator pane. The OracleAS TopLink Sessions Editor displays the session's properties in the Editor pane.
Click the General tab. The General property sheet appears.
Field | Description |
---|---|
Session Type | Specify whether this is a Database or Server session (the <session-type> tag).
|
Project Type | Specify whether this is a Class or XML project (the <project-class> or <project-xml> tag).
|
Profiler | Specify the profiler class (the <profiler-class> tag).
|
Exception Handler | Specify the exception handler class (the <exception-handler-class> tag).
|
External Transaction Controller | Specify whether OracleAS TopLink database calls are synchronized with the container's transaction manager (the <uses-external-transaction-controller> tag).
|
Event Listeners | Name of the event listener(s) registered with the session (the <event-listener-class> tag).
Click Add to add a new event listener. |
Refer to the Oracle Application Server TopLink Application Developer's Guide for more information.
Select the session element in the Navigator pane. The OracleAS TopLink Sessions Editor displays the session's properties in the Editor pane.
Click the Logging tab. The Logging property sheet appears.
Use this table to enter data in each field:
Field | Description |
---|---|
Logging | Use these fields to specify the session logging properties. Select Default to use the logging properties specified by OracleAS TopLink. |
Enable Logging | Specify whether the session logs messages (the <enable-logging> tag).
|
Logging Options | Specify whether the session logs individual message types (such as the <log-debug> tag).
|
Refer to the Oracle Application Server TopLink Application Developer's Guide for more information.
OracleAS TopLink sessions may contain advanced properties to specify login and clustering (cache synchronization) information. Select one of the following methods to display the advanced properties:
Right-click the session in the Navigator pane and choose Advanced > Login or Clustering from the pop-up menu.
Description of the illustration loginbtn.gif
Description of the illustration cachbtn.gif
Select the session in the Navigator pane and click Login or Clustering on the Navigator pane toolbar.
Select the session element in the Navigator pane. The OracleAS TopLink Sessions Editor displays the session's properties in the Editor pane.
Click the Login tab. The General tab of the Login property sheet appears.
Description of the illustration loginbtn.gif
If the Login advanced property is not visible for the session, click the Login button on the Navigator toolbar.
Use this table to enter data in each field:
Use this table to enter data in each field:
Field | Description |
---|---|
Use Native Sequencing | Specify whether the login uses the database's native sequencing (the <uses-native-sequencing> tag).
|
Preallocation Size | Number of sequences retrieved from the database (the <sequence-preallocation-size> tag).
|
Table | Name of the sequence table (the <sequence-table> tag).
|
Name Field | Field in the sequence Table that contains the sequence name (the <sequence-name-field> tag).
|
Counter Field | Field in the sequence Table that contains the sequence counter (the <sequence-counter-field> tag).
|
Click the Options tab. The Options Login property sheet appears.
Use this table to enter data in each field:
Select the session element in the Navigator pane. The OracleAS TopLink Sessions Editor displays the session's properties in the Editor pane.
Click the Clustering tab. The Clustering property sheet appears.
Description of the illustration cachbtn.gif
If the Clustering advanced property is not visible for the session, click the Clustering button in the Navigator toolbar.
Use this table to enter data in each field:
Field | Description |
---|---|
Clustering Service | Name of the clustering service used for cache synchronization (the <clustering-service> tag).
|
Multicast Port | Multicast port used by the clustering service to listen for new sessions (the <multicast-port> tag).
|
Multicast Group Address | IP address used by the clustering service to listen for new sessions (the <multicast-group-address> tag).
|
Packet Time to Live | The maximum number of hops a packet will be broadcast (the <packet-time-to-live> tag).
|
Asynchronous | Specify whether the cache manager does not require that all sessions be synchronized before returning (the <is-asynchronous> tag).
|
Remove Connection on Error | Specify whether OracleAS TopLink removes the connection from the session in case of a configuration error (the <should-remove-on-error> tag).
|
JMS Topic |
|
Name | Specify the name of the JMS topic (the <jms-topic-name> tag).
|
Connection Factory Name | Specify the name of the JMS topic connection factory (the <jms-topic-connection-factory-name> tag).
|
Naming Service |
|
URL | URL of the global namespace for the cache synchronization (the <naming-service-url> tag).
Note: Normally, this is the URL of the JNDI service. |
Initial Context Factory Name | Name of the element used for synchronization (the <naming-service-initial-context-factory-name> tag).
|
Use JNDI Login | Specify whether cache synchronization uses a JNDI service. |
Username | Name used to log into the JNDI service (the <jndi-user-name> tag).
|
Password | Password used to log into the JNDI service (the <jndi-password> tag).
|
Refer to the Oracle Application Server TopLink Application Developer's Guide for more information.
OracleAS TopLink uses connection pools to manage and share the connections used by the server and client sessions among multiple clients. This feature reduces the number of connections required by the application server and allows the server to support many clients.
Description of the illustration conpolbt.gif
To create a new connection pool, right-click a session element in the Navigator pane and choose New > Connection Pool from the pop-up menu, or click the Connection Pool button.
Select the connection pool element in the Navigator pane. The OracleAS TopLink Sessions Editor displays the connection pool's properties in the Editor pane.
Use this table to enter data in each field:
Field | Description |
---|---|
Read Connection Pool | Specifies whether OracleAS TopLink uses a read connection pool (the <is-read-connection-pool> tag).
|
Connection Count | Specify the Minimum and Maximum read connections in the OracleAS TopLink connection pool (the <min-connections> and <max connections> tags).
|
Refer to the Oracle Application Server TopLink Application Developer's Guide for more information.
Select the connection pool element in the Navigator pane. The OracleAS TopLink Sessions Editor displays the connection pool's properties in the Editor pane.
Click the Login tab. The General tab of the Login property sheet appears. See "Setting Login Properties"