• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

urgent help for session time out

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, William, Sunny and George.
Lily
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic