This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Mock Exam Question on Session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Mock Exam Question on Session" Watch "Mock Exam Question on Session" New topic
Author

Mock Exam Question on Session

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

This is from the Javaranch Mock exam!

Servlets that implement the SingleThreadModel cannot share a single HttpSession Object accross multiple servlets. True or False?

I answered True. Am I right?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Why ? The session is the same, whether SingleThreadModel is used or not. (note that SingleThreadModel is deprecated, and may not be at the exam)


[My Blog]
All roads lead to JavaRanch
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Then why is that question on the Javaranch Mock exam?
Sagar kanchi
Ranch Hand

Joined: Oct 07, 2005
Posts: 50
If there is single Http Session object then nothing will stop it being shared by multiple servlets. So, I think the answer is False.

Just to remind, Single Thread Model guarantees only single thread of execution at any given time and NOTHING ELSE.


Where there are more wonders there is less knowledge
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
I agree the answer should be false


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Then why is that question on the Javaranch Mock exam?

As written in the Links, this mock is for SCWCD 1.3.
Atul Sawant
Ranch Hand

Joined: Jul 06, 2006
Posts: 304
hmmm...i think it is false too.

Initially, i thought it was true however i realized once a session is created by any servlet it does not belong to that servlet and can be accessed by other serlvets unless we have a block which has been schronized with session object.


Mission SCWCD. Mission SCJP Complete: SCJP 1.4 - 91%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mock Exam Question on Session
 
Similar Threads
scdjws 5
Cookies, URL rewrting, SSL support
Passed SCWCD with 98%
query in servlet
Planning to take SCWCD