Oracle9iAS Portal Developer Kit
A Primer on Session Context

Session context services return information about a user's session. The session context includes information about the portal user including username, current session ID, IP address, and language preference. It also includes supporting information such as the Oracle9iAS Portal schema currently being used.

Session context services are available through the wwctx_api package.

Key Features

Whenever user logs on to Oracle9iAS Portal, a session is established on the portal. This session contains several pieces of information about the user.

Session Context services in the Oracle9iAS Portal framework provide the following key pieces of information:

Current User

You can find who the current user is by using the wwctx_api.get_user method.

User Logged in Status

You can find whether the current user is logged in or not by using the wwctx_api.is_logged_on method.

Log in Time

You can find when the current user logged in by using the wwctx_api.get_login_time method.

Language

You can find the language setting of the current user by using the wwctx_api.get_nls_language method.

Current Session ID

You can find the session Id for the current connection by using the wwctx_api.get_sessionid method.

IP Address of User Client

You can find the IP address of the client logged in by using the wwctx_api.get_ip_address method.

User Schema

You can find which schema the current light-weight user uses to connect to the database by using the wwctx_api.get_db_user method.

Portal Schema

You can find the schema in which Oracle9iAS Portal is installed by using the wwctx_api.get_product_schema method.

Portal Version

You can find the version number of Oracle9iAS Portal that is installed by using the wwctx_api.get_product_version method.

How to Use Session Context

The general model for working with the session context can be described as follows:

1. Identify the piece of information you require for your functionality.
2. Use the appropriate method from the wwctx_api to get this value.

Using the session context is as simple as that.

Tips for using Session Context

Remember that the session context API is available only in a browser based environment and cannot be run outside of it.

For further details regarding implementation, refer to Implementing Session Context.

Revision History

- November 15, 2000.