It's not a secret anymore!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ attributes and listeners question doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ attributes and listeners question doubt" Watch "HFSJ attributes and listeners question doubt" New topic
Author

HFSJ attributes and listeners question doubt

Adam Czysciak
Ranch Hand

Joined: Feb 25, 2005
Posts: 82
Page 215, question 2:

Which statements about ServletContext initialization parameters are true?
A. They should be used for data that changes rarely.

This is one of the correct answers. It's a bit unclear for me (or, I'd rather say, it can be understood in two different ways).

As we know, init parameters are read-only Strings, so these can't change during application lifecycle *at all*. Therefore this option is incorrect, right? It would be correct for ServletContext attributes. But, now comes the second way of understanding the question... these init parameters may be changed in deployment descriptor, therefore I agree - these are changed very rarely (like the sample admin's email), but *only* between deployments.

I think there should be some more information added to this question, maybe a good item to add to errata.


Adam<br /> <br /><i>SCJA, SCJP 5.0, SCWCD 1.4, SCBCD 5, SCEA 5</i>
Gaurav Gambhir
Ranch Hand

Joined: Mar 04, 2006
Posts: 254
First way
init parameters are read-only Strings, so these can't change during application lifecycle


Closely match to option A,so that we can put them direcly as context-param


Second way of understanding the question... these init parameters may be changed in deployment descriptor, therefore I agree - these are changed very rarely


Also refers to option A is right.
[ June 21, 2006: Message edited by: Gaurav Gambhir ]
Adam Czysciak
Ranch Hand

Joined: Feb 25, 2005
Posts: 82
First way
"init parameters are read-only Strings, so these can't change during application lifecycle"
Closely match to option A,so that we can put them direcly as context-param

Why does it match? Does 'rare' changing include 'no changing'? For me, writing about data that changes rarely means that data changes at least once. But context-param's can't be changed in other way then modifying DD, so for first case option A is incorrect.

I agree about second way.
[ June 22, 2006: Message edited by: Adam Czysciak ]
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Originally posted by Adam Czysciak:
Why does it match? Does 'rare' changing include 'no changing'? For me, writing about data that changes rarely means that data changes at least once.

Any time you're dealing with deployment descriptors (and answering exam questions) you need to step outside of the programmer's paradigm and assume that the question is being asked at a higher level.

I do agree that the question can be misleading to a programmer, but the wording in HFSJ doesn't bother me so much because the actual SCWCD exam likely would word it the same way. What's more is that the SCBCD, being so DD-oriented, is loaded with questions worded much like this.


A good workman is known by his tools.
 
 
subject: HFSJ attributes and listeners question doubt