1 Reply Latest reply on Jul 3, 2013 1:36 PM by Christian Neumueller-Oracle

    Expire all active sessions and force login

    Dietmar Aust

      Hi guys,



      does anybody have an idea to expire all sessions at once for a specific application?



      The use case:



      In my application I store the data historically (Jan, Feb, Mar, ...). Upon login the most current month is calulated and used throughout the APEX session.

      Whenever I load the data for the next month, I want to reset the current month and possibly other application items. Therefore, the most natural approach seems to me to log out all users and have them to log in again.



      Can this be accomplished?



      Aside from that I could use an application process to check whether new data is available on each page request. But this is rather an expensive lookup I wouldn't want to run on each page request.





        • 1. Re: Expire all active sessions and force login
          Christian Neumueller-Oracle

          Hi Dietmar,


          it's not entirely what you want, but the authentication schemes contain a hook for a verify function. If this returns false, APEX creates a new session. The verify function could compare the session's version of most current month (e.g. stored in an app item) with the actual value. I would prefer this to an application process. As for the lookup, maybe it can be made more efficient by a result cached function, a materialized view or a global application context?


          We do not have a public API to log out all users of an application. You could directly access the repository (e.g. delete from wwv_flow_sessions$), but I will never recommend that on the forum, not even to you ;-)