6 Replies Latest reply: Feb 8, 2013 2:41 PM by Shay Shmeltzer-Oracle RSS

    how to kill the session after the user exit the ADF application

    Tarek Fathy
      Dear all
      I have a problem
      The problem is the session still exist after the user close the application and the browser. I want to kill all sessions that is not active.

      This is my test scenario:
      1- I open IE and run my ADF application that is deployed on weblogic. http://192.168.100.17:7001/myapp/faces/login
      2- At the same time I issue this SQL command to view the sessions for user 'ADFUSER' - the "ADFUSER" is the schema user.
      SELECT USERNAME,STATUS FROM v$session
      WHERE USERNAME = 'ADFUSER';
      QUERY RESULT IS
      USERNAME                       MODULE                                           STATUS
      ------------------------------ ------------------------------------------------ --------
      ADFUSER                         JDBC Thin Client                                 INACTIVE
      3- Now the user close the browser
      4- Run the SQL again and I notice that the session still exist
      SELECT USERNAME,STATUS FROM v$session
      WHERE USERNAME = 'ADFUSER'
      RESULT:
      USERNAME                       MODULE                                           STATUS
      ------------------------------ ------------------------------------------------ --------
      ADFUSER                        JDBC Thin Client                                 INACTIVE
      5- now the user open the URL again http://192.168.100.17:7001/myapp/faces/login
      6-Run the SQL again , and I notice that the old session still exists and a new session created too.
      SELECT USERNAME,STATUS FROM v$session
      WHERE USERNAME = 'ADFUSER'
      RESULT:
      USERNAME                       MODULE                                           STATUS
      ------------------------------ ------------------------------------------------ --------
      ADFUSER                        JDBC Thin Client                                 INACTIVE
      ADFUSER                        JDBC Thin Client                                 INACTIVE
      
      2 rows selected.
      and every time I login to the application , a new session is open and the old session still exist
      I do not know why this happens
      I want to kill old session when the user close the application.
      These sessions are cleared only when i restart the weblogic domain.

      here is some information about my development environment:
      Jdeveloper 11.1.2.3
      WebLogic Server Version: 10.3.5.0
      Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

      thanks in advance