File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Calling invalidate() on the session.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Calling invalidate() on the session...." Watch "Calling invalidate() on the session...." New topic

Calling invalidate() on the session....

Narasimha Rao B.
Ranch Hand

Joined: Aug 26, 2002
Posts: 205

If there are service methods are running on different servlet instances in a session and if someone calls the invalidate() method on this session, what will happen? Will all the threads running in the service methods are killed and the session is invalidated OR will the container waits till the service methods finishes their job?

Thanks in Advance,

Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
calling invalidate will terminate the session as a whole.

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
I agree. Here's the link:
subject: Calling invalidate() on the session....
It's not a secret anymore!