1
votes

I'm trying to implement validation that depends on attributes that users have in their apex session. For example when you as a user pick for ATRIBUTE VALUE1 apex should check if there is another active session with the same attribute value. If there is any user can't move on.

I created function that checked session items (apex_190200.WWV_FLOW_DATA_VIEW) and thats working fine. But I have problem with closing session and releasing items. I'm using SSO so there is no "LOG OUT". I'm trying to find solution for closing/deleting apex session after user closing browser or tab with apex. At least clear cache of all items that was in this session. we can do it with

begin
    apex_session.delete_session (
    p_session_id => v('APP_SESSION'));
    apex_session.detach;
end;

But I can't find how to launch it before window/tab is closed.

Or maybe there is some setting that allow to have apex session existing only when the application is open in browser?

1
Good luck with that. What's the real reason? Shouldn't a natural, read consistent database be your friend here? And querying an undocumented view is not "working fine". Maybe consider apex_workspace_sessions.session_life_timeout_onScott
There is no other documented view with session items values, at least i could't find it. Right now I'm using session life and idle time. But there is need to release attr value right after closing browser by user.Paweł Żurkiewicz
No, session state is internal to the APEX engine. Ending sessions has too many prickles - check out this thread community.oracle.com/thread/4323164Scott
I could avoid using the view I mentioned and choose session item values ​​directly from wwv_flow_data. I just need to know if there is someone with certain value in the sessions and I need to know if this guy still has the app open.Paweł Żurkiewicz
You can look through this thread here: stackoverflow.com/questions/60115946/… In the end, trying to deal with browser close wasn't reliable so a ping based solution was implemented in the end (see the comments on my answer).Dan McGhan

1 Answers

0
votes

There is no specific event for capturing browser close event. You can only capture on unload event of the current page.