This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Want Comments On the Session Killing (imp)  RSS feed

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Deepak
 
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!