This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

urgent help for session time out

 
lily zou
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are right lily.
Check your log. I thought that there might be a exception been thrown in your delete operation.
 
lily zou
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, William, Sunny and George.
Lily
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic