Oracle® Application Express Administration Guide Release 3.2 E12512-02 |
|
|
PDF · Mobi · ePub |
A session is a logical construct that establishes persistence (or stateful behavior) across page views. Each session is assigned an unique ID, which the Application Express engine uses to store and retrieve an application's working set of data (or session state) before and after each page view. Sessions persist in the database until purged.
Topics in this section include:
See Also:
"Managing Session State" in Oracle Application Express Application Builder User’s GuideA session establishes persistence (or stateful behavior) across page views. You can review session details for the current session or for recent sessions. You can also purge the current session state or purge sessions based on their age.
Topics in this section include:
See Also:
"What Is a Session?" in Oracle Application Express Application Builder User’s GuideYou can determine whether to remove existing sessions by first reviewing session details. From the Session Details page, you can then remove the session record or session state.
To view session details and remove session state:
Navigate to the Workspace home page.
Click Manage Services on the Administration list.
The Manage Services page appears.
Under Session State, click Manage Session State.
Click Recent Sessions with Drill-Down to Session Details.
To narrow the results, select a time frame, specify a user, and click Go.
To view session details, select the session ID.
The Session Details page appears.
Click one of the following buttons:
Remove Session removes the record of the session from the SESSIONS
table along with the session state (including collections data) associated with the session.
Any user using a session that is removed will no longer be able to use the session and will be prompted to re-authenticate upon their next page request (in most situations). This option can be used by administrators who need to ensure a specific user can no longer access an Oracle Application Express application.
Remove State clears the session data from the session state tables (including collections data) but does not remove the session record. Removing a session is a good approach for developers during debugging.
This is the equivalent of clearing session state for the current session using the Clear Cache argument value SESSION
in the f?p URL. This option might also be used by developers during debugging.
See Also:
"Debugging an Application" in Oracle Application Express Application Builder User’s GuideTo view session state for the current or recent sessions:
Navigate to the Workspace home page.
Click Manage Services on the Administration list.
The Manage Services page appears.
Under Session State, click Manage Session State.
On the Manage Session State page:
To view information about the current session, click Report Session State for Current Session. To search for an item in the details, enter the item and click Go.
To view a list of recent sessions, click Recent Sessions with Drill-Down to Session Details.
To purge session state for the current session:
Navigate to the Workspace home page.
Click Manage Services on the Administration list.
The Manage Services page appears.
Under Session State, click Manage Session State.
On the Manage Session State page, click Purge Session State for Current Session.
From the Purge Session State page:
To view information about the current session, click View Session State.
To reset the session state for the current session, click Purge Session State.
To purge existing sessions by age:
Navigate to the Workspace home page.
Click Manage Services on the Administration list.
The Manage Services page appears.
Under Session State, click Manage Session State.
Select Purge sessions by Age.
Make a selection from the Sessions older than list.
Click one of the following buttons:
Report Sessions generates a report detailing the total number of sessions for the workspace, the number of users, and the number of old sessions.
Purge Sessions purges existing sessions by the age you selected.
See Also:
"Viewing Session State" in Oracle Application Express Application Builder User’s GuideYou can use preferences to store values for a specific Application Express user across distinct sessions. Once set, these preferences can be removed programmatically or manually. You can set user preferences by creating a page process, by the calculation of a preference Item Source Value, or programmatically by using a PL/SQL API.
Topics in this section include:
To manage user preferences for the current user:
Navigate to the Workspace home page.
Click Manage Services on the Administration list.
The Manage Services page appears.
Under Session State, click Manage Preferences.
The Manage Preferences page appears.
To view preference information about the current user, click Report Current User Preferences.
The Current User Preferences page appears.
To view and reset preferences for the current user, click Purge Preferences for Current User. On the Purge Preferences page, click the appropriate button:
Reset Preferences
View Preferences
To view the preferences for specific users:
Navigate to the Workspace home page.
Click Manage Services on the Administration list.
The Manage Services page appears.
Under Session State, click Manage Preferences.
The Manage Preferences page appears.
To view preference information about a specific user, click Preferences by User.
Use the search bar at the top of the page to narrow the display.
To view and reset preferences for the current user:
Click Purge Preferences by User.
Select a user from the list and click Report.
A report appears.
To purge user preferences, click Purge User Preferences.
You can set user preferences within your application through the creation of a page process, by creating a preference item, or programmatically.
Topics in this section include:
To set user preference values by creating a page process:
Navigate to the appropriate Page Definition. See "Accessing a Page Definition" in Oracle Application Express Application Builder User’s Guide.
Under Processes, click the Create icon.
The Create Page Process Wizard appears.
For the process category, select Session State.
For the process type, select one of the following:
Set Preference to value of item
Set Preference to value of item if item is not null
Specify a process name, sequence, and processing point.
Specify the preference value in the field provided using the format:
PreferenceName:Item
Click Page Items to see a list of available items.
Click Create Process.
You can set the source of an item based on a user preference by defining the item source type as Preference.
To define the source of item based on a user preference:
Navigate to the appropriate Page Definition. See "Accessing a Page Definition" in Oracle Application Express Application Builder User’s Guide.
Under Items, click the Create icon.
The Create Item Wizard appears.
For the item type, select Hidden.
Specify the Item Name, sequence, and region.
From the Item Source list, select Preference.
In Item Source Value, enter the name of the preference.
Click Create Item.
To set or reference user preferences programmatically, you must use a PL/SQL API. User-level caching is available programmatically. You can use the SET_PREFERENCE
procedure to set a user level preference called NAMED_PREFERENCE
. For example:
APEX_UTIL.SET_PREFERENCE( p_preference=>'NAMED_PREFERENCE', p_value =>:ITEM_NAME);
You can reference the value of a user preference using the function GET_PREFERENCE
. For example:
NVL(APEX_UTIL.GET_PREFERENCE('NAMED_PREFERENCE'),15)
In the previous example, the preference would default to the value 15 if the preference contained no value.
See Also:
"GET_PREFERENCE Function and "SET_PREFERENCE Procedure in Oracle Application Express Application Builder User’s GuideTo remove user preferences programmatically, you must use a PL/SQL API. You can use the REMOVE_PREFERENCE
procedure to remove a user level preference called NAMED_PREFERENCE
. For example:
APEX_UTIL.REMOVE_PREFERENCE( p_preference=>'NAMED_PREFERENCE');
You can reset user preferences by creating a page process and selecting the Reset Preferences process type.
To reset user preferences using a page process:
Navigate to the appropriate Page Definition. See "Accessing a Page Definition" in Oracle Application Express Application Builder User’s Guide.
Under Processes, click the Create icon.
The Create Page Process Wizard appears.
For the process category, select Session State.
From Type, select Reset Preferences.
Specify a process name, sequence, and process point.
Follow the on-screen instructions.
You can purge preferences for a specific user on the Purge Preferences page.
To purge preferences for a specific user:
Navigate to the Workspace home page.
Click Manage Services on the Administration list.
The Manage Services page appears.
Under Session State, click Manage Preferences.
Click Purge preferences by User.
The Purge Preferences page appears.
Select a specific user and click Report.
A report appears at the bottom of the page.
To purge the displayed user preferences, click Purge User Preferences.