This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes urgent help for session time out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "urgent help for session time out" Watch "urgent help for session time out" New topic
Author

urgent help for session time out

lily zou
Ranch Hand

Joined: Jan 15, 2002
Posts: 50
I use httpsessionbindinglistener to clean up database ( simple , just delete one entry from DB). It works fine on develop machine. I was able to observer that database has been cleaned up after user log out ( invalidate session explicitly ) or session time out ( 30 min.). However, we found some of the session could NOT been destroyed and be there even for several days after we deployed to client server. So we have to clean up DB manually in order to let the same user log in again.
We use tomcat3.2.1 and I wonder why servlet engine neglect those sessions ???
Any help is highly appreciated.
Thanks,
Lily
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Are you sure that the session is still there or just that the entry has not been deleted? I have not seen anything about session management failing in Tomcat 3.2.1 - would you detect it if there is an exception when trying to delete the entry?
Bill
[ March 27, 2002: Message edited by: William Brogden ]
lily zou
Ranch Hand

Joined: Jan 15, 2002
Posts: 50
thank you very much,William
I have a basic question. The session time out should be the time period during which session remains idle, is it right ?
Lily
Sunny Liu
Ranch Hand

Joined: Mar 15, 2002
Posts: 63
you are right lily.
Check your log. I thought that there might be a exception been thrown in your delete operation.


If I am rich, I will spend more.<p>IBM 486 (OOAD & UML) & 141 (XML) passed<br />Oracle 1Z0-007 passed<br />MCSD MCDBA MCSE <br />SCJP SCSSA<br />CCNA CNA A+
lily zou
Ranch Hand

Joined: Jan 15, 2002
Posts: 50
hi, William. There is no exception thrown from anywhere regarding db clean up action resulted from deleting session object. Therefore I assume that session object should be there.
Also, the session time out should be the session idle time. I set it to be 30 min.
Is there any way to check if the specific session is existing on server ?
Lily
lily zou
Ranch Hand

Joined: Jan 15, 2002
Posts: 50
Also, what will happen if I restart the webserver ? All the existing sessions will get erased or invalidated ? If they get erased, the db clean up will never take place, is it correct?
Lily
George Pavamani
Ranch Hand

Joined: Jan 31, 2002
Posts: 31
I think when we restart the webserver, the HttpBindingListener is called and it should clean up the database. I guess you might have a probelm when there is a power-loss or a server crash. In either of the cases i am not sure if the HttpBindingListener is called.
Please correct me if i am wrong.If i am correct, is there a soultion to this problem.
Thanks
George
lily zou
Ranch Hand

Joined: Jan 15, 2002
Posts: 50
Thanks, William, Sunny and George.
Lily
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: urgent help for session time out
 
Similar Threads
Ways to disable concurrent login per user on web application
regarding session
custom security and HttpSession access
How to block multiple logins of the same user
multiple sessions and single sign on