This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Diffcult Mock Question from ?K Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Diffcult Mock Question from ?K" Watch "Diffcult Mock Question from ?K" New topic
Author

Diffcult Mock Question from ?K

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
Given the definition of SomeObject and that an instance of SomeObject is bound as a session attribute:
8. package com.example:
9. public class SomeObject implements
10. javax.servlet.http.HttpSessionBindingListner{
11. // more code here
12. }
Which is true?
A. Only single instance of MyObject may exist within a session.
B. The unbound method of the MyObject instance is called when the session to which it is bound to times out.
C. The com.example.MyObject must be declared as a servlet event listener in the web DD
D. The valueUnbound method of the MyObject instance is called when the session to which it is bound times out.
Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
MyObject=SomeObject

Note: I modified the original question.
B.Sathish
Ranch Hand

Joined: Aug 18, 2005
Posts: 372
D is the right answer
Alexandre Cervieri
Greenhorn

Joined: Aug 02, 2005
Posts: 27
Originally posted by B Sathish:
D is the right answer


Hi Alec, maybe I'm losing some detail, but why did you consider this question difficult?
I agree with Sathish the answer is D and it seems to be an easy question.
[ September 28, 2005: Message edited by: Alexandre Cervieri ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Diffcult Mock Question from ?K
 
Similar Threads
I do not know what's what....
session timeout and finally method
Single Logon
Saving data at the time of session timing out
Difference between HttpSessionBindingListener and HttpSessionAttributeListener