• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setMaxInactiveInterval() method

 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
If I have code : setMaxInactiveInterval(0);
Is it true that the current session will be invalidated?
thanks
daniel
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From what I understand, yes, but when the session will actually be invalidated is dependent on the app server you're using. I know in the HP Application Server and Bluestone's Total-e-Server, we have a session reaper, that goes through every X seconds and checks which sessions need to be invalidated. So there may be a time delay of X seconds between when the session actually exceeds it's time and when it's actually invalidated.
But that's more of an implementation detail than something you need to know for the exam. In theory, yes if you call setMaxInactiveInterval(0) the session will timeout immediately (be invalidated).
... On a totally random note, if you look at the source code for our SessionReaper, it has method that looks like this:

Get it? the Reaper is Grim?
[ May 04, 2003: Message edited by: Jessica Sant ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic