Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Configuring the Server Platform

The TopLink server platform defines how a session integrates with a J2EE server including the following:

Table 77-8 summarizes which sessions support a server platform.

If the primary mapping project that you associate with a session has a persistence type of bean-managed persistence (BMP) or Java objects, you may configure a server platform using TopLink Workbench. For more information on primary mapping project, see "Configuring a Primary Mapping Project".

If the primary mapping project you associate with a session has a persistence type of container-managed persistence (CMP), by default, the TopLink runtime automatically configures a server platform to accommodate the application server on which it is deployed.

Using TopLink Workbench

To specify the server platform options for a session, use this procedure:

  1. Select a session in the Navigator. Its properties appear in the Editor.

  2. Click the General tab. The General tab appears.

  3. Click the Server Platform subtab. The Server Platform subtab appears.

    Figure 77-7 General Tab, Server Platform Subtab

    Description of Figure 77-7  follows
    Description of "Figure 77-7 General Tab, Server Platform Subtab"

Use the following information to enter data in each field of the Server Platform subtab:

Field Description
Server Platform Check this field if you intend to deploy your application to a J2EE application server.

If you check this field, you must configure the target application server by selecting a Platform.

Platform Select the J2EE application server to which you will deploy your application.

TopLink supports the following J2EE application servers:

  • OC4J 10.1.3

  • OC4J 10.1.2

  • OC4J 9.0.4

  • OC4J 9.0.3

  • WebLogic 8.1

  • WebLogic 7.0

  • WebLogic 6.1

  • WebSphere 6.0

  • WebSphere 5.1

  • WebSphere 5.0

  • WebSphere 4.0

  • Custom

For detailed information about supported application server versions and configuration requirements, see "Integrating TopLink With an Application Server ".

Select Custom if you have created your own oracle.toplink.platform.server.ServerPlatform class to use an application server not currently supported by TopLink or to override an existing ServerPlatform. If you select Custom, you must specify your custom ServerPlatform class by selecting a Server Platform Class.

The server platform you select overrides the default server platform set at the sessions configuration level (see "Creating a Sessions Configuration").

Enable Runtime Services Check this field to configure the TopLink runtime to enable the deployment of a JMX MBean that allows monitoring of the TopLink session. Currently, this is only supported for OC4J.

To use this feature, you must enable DMS data collection. For more information, see "Configuring the Oracle DMS Profiler".

Enable External Transaction Controller (JTA) Check this field if you intend to integrate your application with an external transaction controller. For more information, see "Unit of Work Transaction Demarcation".

If you configure Platform for a J2EE application server that TopLink supports, the TopLink runtime will automatically select the appropriate external transaction controller class.

If you configure Platform as Custom, you must specify an external transaction controller class by selecting an External Transaction Controller.

Server Platform Class This option is only available if you configure Platform as Custom.

Click Browse to select your custom ServerPlatform class.

Transaction Controller Class (JTA) This option is only available if you configure Platform as Custom.

If you checked Enable External Transaction Controller (JTA), click Browse to select the transaction controller class that corresponds with your custom ServerPlatform class.


Using Java

When using Java, you must pass the session in a server platform constructor. Example 77-7 illustrates using a session event listener (see "Configuring Session Event Listeners") to configure a session with a server platform from the oracle.toplink.platform.server package.

Example 77-7 Configuring a Session with a Server Platform

public void preLogin(SessionEvent event) {
  Server server = (Server) event.getSession();
  server.setServerPlatform(new Oc4j_10_1_3_Platform((DatabaseSession) server));
  }