aspose file tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Mock question regarding session Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Mock question regarding session " Watch "Mock question regarding session " New topic
Author

Mock question regarding session

Parameswaran Thangavel
Ranch Hand

Joined: Mar 01, 2005
Posts: 485
hi
i came across the below question.
i doubt more than one answer is right. can any one explain which is right option.

In which of the following situations will a session be definitely invalidated?

Select 2 correct options.

1) The container is shutdown and brought up again.
2) No request comes from the client for more than "session timeout" period.
3) A servlet explicitly calls invalidate() on a session object.
4) If the session time out is set to 0 using setMaxInactiveInterval() method,
the session will never be invalidated automatically.
Shivani Chandna
Ranch Hand

Joined: Sep 18, 2004
Posts: 380
Answer 2 &3 :
2) No request comes from the client for more than "session timeout" period.
3) A servlet explicitly calls invalidate() on a session object.

Regards,
Shivani


/** Code speaks louder than words */
Firas Zuriekat
Ranch Hand

Joined: May 09, 2006
Posts: 143
2) No request comes from the client for more than "session timeout" period


I don't understand why 2 is correct. I think for it to be correct it should be worded correctly (in terms of grammer and syntax). For it to be correct, it should be worded as follows (for e.g.):

2) No request comes from the client

You just can't talk apple and oranges. I mean you can't talk request and period. This is because request is not a form of time (period).

Please correct me if I am wrong.
Mohd Fuzail
Ranch Hand

Joined: Feb 20, 2002
Posts: 107
2) No request comes from the client


Question is till when container will wait for request for client, before it decides to invalidate the session being create for that client.

Here 'Session Timeout' comes into picture. Container will wait till 'Session Timeout' time and if no request comes from Client till then, Session is invalidated.

Hope it helps


Being defeated is often a temporary condition. Giving up is what makes it permanent.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Mock question regarding session
 
Similar Threads
is session id from cookie?
Session Invalidate
HttpSessionBindingListener question
session's invalidation behaviour
tomcat reuse a few range of jsessionid all day