| load_session function and get_session function

Related topics
Contained in package wwa_api_module_session. Both load_session and get_session load an existing form component session instance and then return a copy of the form component session. However, get_session first checks for a copy of the form component session in the cache and if present returns the cached copy. If the form component session is not present in the cache, load_session is called to load a fresh copy from the database, return the newly loaded session and also caches it. The session storage is located by the combination of the form component session ID parameter (p_id) and the Login session ID (wwctx_api.get_sessionid). static function load_session ( p_id in integer ) return wwa_api_module_session,

Version: Oracle Portal 3.0.9
Parameters:
p_id | The form component session ID, previously returned by create_session. Datatype: integer
Return: This function returns a form component session object. Exceptions: If you try to get/load a session that does not exist (i.e. the p_id does not exist) or if it belongs to another Login session (i.e. wwctx_api.get_sessionid returns a Login session ID different from the one that had created the form session), a NO DATA FOUND exception is raised. Example: Consider a form component session (id = 77) previously created and stored in the database using create_session. To retrieve the session: declare l_session wwa_api_module_session; begin --- First check the cache for a copy of the form session data, --- if cache is absent, load the session data --- from the database by calling load_session; --- all this is done by get_session l_session := <portal_schema>.wwa_api_module_session.get_session ( p_id => 77 ); To load the session directly from the database: l_session := <portal_schema>.wwa_api_module_session.load_session ( p_id => 77 ); exception when NO DATA FOUND then ... --- The session you are looking for is not --- in the database or belongs to a different Login session end;

Related topics
Form component session API package | PDK PL/SQL API Reference - Home

Back to top
The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio