| Author |
Ignoring a certain transaction so the session is not always alive
|
Carmi Gazit
Greenhorn
Joined: Aug 27, 2003
Posts: 10
|
|
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26167
|
|
|
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.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Carmi Gazit
Greenhorn
Joined: Aug 27, 2003
Posts: 10
|
|
|
Thanks Jeanne, I think this will give me the solution I need.
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Ignoring a certain transaction so the session is not always alive
|
|
|