This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
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.