Results 1 to 2 of 2

Thread: Kill sessions

  1. #1
    Join Date
    Oct 2009
    Rep Power

    Default Kill sessions

    here's my problem. I have a web app that's deployed on a tomcat cluster. i have a requirement in the application, that the admin can kill some user sessions when he wishes. for that we need the session details of all the users which we can save it in the application. now, the problem is that, how do we know which session is attached with which tomcat instance of the cluster?

    is there a way, where we can get this information or , can we send information to the proxy server, etc. to kill the required user session ?
    please help. any other suggestions are also welcome.


  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Rep Power


    maybe in your application if you created a HttpSessionListener that maintained your own administrative map of sessions. this would allow your admin module to get a handle on the session object. while not being able to delete them, you could remove all of the session attributes from the session(which depending on what your app stores in the session, should cause the user to get booted) and set the maxInactiveInterval to 1 second, which would cause it to be deleted right away.

    for finding the user, you could have an application convention of storing the user's login name as a session attribute that this administrative session manager would be able to show.

Similar Threads

  1. kill a thread
    By Peter in forum Advanced Java
    Replies: 6
    Last Post: 06-22-2010, 09:08 AM
  2. How I launch an external program and kill the father?
    By Dr_Misterio in forum New To Java
    Replies: 2
    Last Post: 08-05-2009, 04:31 PM
  3. Identify and kill forked jvm (ant java task)
    By stockbroker in forum Advanced Java
    Replies: 1
    Last Post: 04-09-2009, 07:27 PM
  4. Sessions in jsp
    By Ed in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-02-2007, 04:46 PM
  5. sessions in jsp
    By Heather in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 06-30-2007, 04:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts