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

HttpSession

 
Justin Rundle
Ranch Hand
Posts: 123
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just need some clarification and can't find anything rock solid in HFSJ. More so my question is related to setting the timeout interval for a session, what is the following result:

session.setMaxInactiveInterval(0) = ...
session.setMaxInactiveInterval(-1) = ...
<session-timeout>0</session-timeout> = ...
<session-timeout>-1</session-timeout> = ...

I under it that either 0 or -1 for either setMaxInactiveInterval and <session-timeout> will cause the session to never invalidate. Is that correct for both?
 
Santosh Raveendran
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
session.setMaxInactiveInterval(0) =session is never valid
session.setMaxInactiveInterval(-1) = session is never expired
<session-timeout>0</session-timeout> =session is never expired
<session-timeout>-1</session-timeout> = session is never expired
[ December 18, 2008: Message edited by: santosh raveendran ]
 
Justin Rundle
Ranch Hand
Posts: 123
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so if session.setMaxInactiveInterval(0) expires the session then is this equivalent to invoking session.invalidate()?
 
Santosh Raveendran
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes Justin you are correct
 
Justin Rundle
Ranch Hand
Posts: 123
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Awesome thanks for your help, yet another inconsistency to remember
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic