my dog learned polymorphism
The moose likes Servlets and the fly likes Want Comments On the Session Killing (imp) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Want Comments On the Session Killing (imp)" Watch "Want Comments On the Session Killing (imp)" New topic

Want Comments On the Session Killing (imp)

deepak bansal
Ranch Hand

Joined: Feb 25, 2001
Posts: 33
Hi All,
Since long i was facing a problem of killing the previous session in the Multi App server Clustered Environment (WebLogic 6.0) .My requirenment was to kill the previous session if two person tries to login again (With Same User iD and Password ). I have implement it Using the URLConnection. I am storing the session information in the Database .
Now Suppose a person logins first time then i am storing the session id against the user id in the database.
If same person tries to login again then i am making the URLConnection sending a request to a InvalidateServlet which will invalidate the current session.I am making URL object .In URL i am giving the session id and some extrat information.
I want your comments.Can it fail in any scenrio.
Thanks & Regards

Be Truthful to yourself!
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Why have you chosen to save the session data in a database, why not let the servlet engine take care of it? That way you get automatic deletion after a time-out.
I agree. Here's the link:
subject: Want Comments On the Session Killing (imp)
jQuery in Action, 3rd edition