This procedure sets the current session's Maximum Session Length in Seconds value. overriding the corresponding application attribute. This allows developers to dynamically shorten or lengthen the session life based on criteria determined after the user authenticates.
APEX_UTIL.SET_SESSION_LIFETIME_SECONDS ( p_seconds IN NUMEBER, p_scope IN VARCHAR2 DEFAULT 'SESSION');
Table 28-106 SET_SESSION_LIFETIME_SECONDS Parameters
A positive integer indicating the number of seconds the session used by this application is allowed to exist.
This parameter is obsolete. The procedure always sets the lifetime for the whole session.
The following example shows how to use the SET_SESSION_LIFETIME_SECONDS procedure to set the current application's Maximum Session Length in Seconds attribute to 7200 seconds (two hours).
By allowing the p_scope input parameter to use the default value of 'SESSION', the following example would actually apply to all applications using the current session. This would be the most common use case when multiple Application Express applications use a common authentication scheme and are designed to operate as a suite in a common session.
BEGIN APEX_UTIL.SET_SESSION_LIFETIME_SECONDS(p_seconds => 7200); END;
The following example shows how to use the SET_SESSION_LIFETIME_SECONDS procedure to set the current application's Maximum Session Length in Seconds attribute to 3600 seconds (one hour).
BEGIN APEX_UTIL.SET_SESSION_LIFETIME_SECONDS(p_seconds => 3600); END;