Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ignoring a certain transaction so the session is not always alive

 
Carmi Gazit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this situation:
I have a transaction polling that is done every 5 minutes to check on a state in the DB and then if something changes update some UI widget on the Client.
Meanwhile, I also have a 1 hour session timeout limit.
Now that we have this polling the client never times out because the polling is keeping the session alive . So, how do I tell the servlet to 'ignore' this particular transaction and only keep the session alive based on the other , user initiated , transactions?
Can I associate a new session with this particular transaction, to keep it separate from the user initiated transactions? I'm using https .
thanks for any pointers.
Carmi
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could keep your own "last accessed time" in the session for a transaction you care about. Then when a transaction comes in, you see if that last access time is too long and call session.invalidate() yourself.
 
Carmi Gazit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne, I think this will give me the solution I need.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic