aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Session Timeout and SCWCD kit question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Session Timeout and SCWCD kit question" Watch "Session Timeout and SCWCD kit question" New topic
Author

Session Timeout and SCWCD kit question

John Lincoln
Ranch Hand

Joined: Feb 11, 2003
Posts: 192
Hi,

In chapter 8 of SCWCD kit, there is a question, if you don't want your web application session not to time-out ever what you would do ?

Answer is set the session-timeout to 0 or -1 in DD. But i think it should be only -1 not 0.

Please help

Thanks
Mark Garland
Ranch Hand

Joined: Nov 11, 2006
Posts: 226
Spookily, I just looked up that very same thing in the specs.

I'm still a little unsure...

If setting <session-timeout> in DD, the spec says
"If the timeout is 0 or less, the container ensures the default behaviour of sessions is never to time out. If this element is not specified, the container must set its default timeout period."

However, for setting it programatically, it just says
"By definition, if the timeout
period for a session is set to -1, the session will never expire."
No mention of 0.
HFSJ p247 has an example where it sets it to 0 and says "causing the session to timeout immediately".

Would appreciate clarification on this.

MG


28/06/06 - SCJP - 69%, 05/06/07 - SCWCD - 92%, 28/02/08 - IBM DB2 v9 Fundamentals (Exam 730) - 87%, 18/11/08 - IBM DB2 v9 DBA (Exam 731) - 89%, 26/02/11 - SCBCD - 88%
Saurabh Kumar
Ranch Hand

Joined: Aug 21, 2006
Posts: 56
Setting Session Timeout in DD:

0: session never expires.
-1(negative value): session never expires.
value greater than 0: session expires after that value.


Setting Session timeout programatically:

0: session expires immediately.
-1(negative value): session never expires.
value greater than 0: session expires after that value.

Hope this helps.

Thanks and regards,
Saurabh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session Timeout and SCWCD kit question