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 EJB Certification (SCBCD/OCPJBCD) and the fly likes Question ? - What do you think and Why 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 » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Question ? - What do you think and Why" Watch "Question ? - What do you think and Why" New topic
Author

Question ? - What do you think and Why

mini mehta
Ranch Hand

Joined: Oct 22, 2000
Posts: 120
Which of the following statements regarding an enterprise bean's environment are correct? [Check all correct answers]



1. The container provides the tools that allow the deployer to create and manage the enterprise bean's environment.



2. Enterprise bean instances can modify the values of the environment entries at runtime.



3. The deployer sets and modifies the values of the environment entries by editing the enterprise bean's deployment descriptor.



4. Enterprise bean instances obtain the values of the environment entries from the enterprise bean's deployment descriptor.



5. Enterprise bean instances use the JNDI interfaces to obtain the values of the environment entries.
trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
I think 4 is correct. Answer 3 can also be correct as the <env-entry-value> can be set by either an application assembler or a deployer.

so i think 3 and 4 are correct.

thanks,
trupti
mini mehta
Ranch Hand

Joined: Oct 22, 2000
Posts: 120
Originally posted by trupti nigam:
I think 4 is correct. Answer 3 can also be correct as the <env-entry-value> can be set by either an application assembler or a deployer.

so i think 3 and 4 are correct.

thanks,
trupti


I had the same feeling, but the www.ejbcertificate.com thinks :

Answers 1 and 5 are correct.

Answer 2 is incorrect because enterprise bean instances can only read the values of the environment entries at runtime and are not able to modify them. Answers 3 and 4 are incorrect because the deployment descriptor is used to define only the environment entries, as opposed to the values that the enterprise bean expects to be provided at runtime.
Sujatha Kumar
Ranch Hand

Joined: Jan 05, 2004
Posts: 134
Answer 3 may be wrong because it is the bean provider who defines the values for <env-entry>

But answer 4 should be correct. I feel even 1 is correct.

guys share your opinions???


SCJP,SCWCD,SCBCD,SCEA Part I
Sujatha Kumar
Ranch Hand

Joined: Jan 05, 2004
Posts: 134
to conclude 1,4 and 5 are correct answers
Alex Sharkoff
Ranch Hand

Joined: Apr 11, 2004
Posts: 209
Hi all,


4. Enterprise bean instances obtain the values of the environment entries from the enterprise bean's deployment descriptor.


I think 4 is incorrect because Enterprise bean instances do not obtain the values of the environment entries from the enterprise bean's deployment descriptor but rather from the its special environment (i.e. its jndi subcontext "java:comp/env"). Environment entries are defined in the deployment descriptor, once ejb-jar is deployed into the app server environment entries get associated with the jndi names, and these are the names that ejb instances use to look environment entry value up.


3. The deployer sets and modifies the values of the environment entries by editing the enterprise bean's deployment descriptor.


I think 3 is a correct answer as deployer must ensure that <env-entry-value> contains a legal value. Please see paragraph 20.2.3 on page 415


All right, my answers to this question would be 1, 3 and 5.


Alex (SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCJD 1.4)
mini mehta
Ranch Hand

Joined: Oct 22, 2000
Posts: 120
Originally posted by Sujatha Kumar:
to conclude 1,4 and 5 are correct answers


Why do u think 3 is wrong?
Karin Paola Illuminate
Ranch Hand

Joined: Oct 18, 2002
Posts: 109
See also http://www.coderanch.com/t/158833/java-EJB-SCBCD/certification/ejbcertificate-com


I not only use all the brains that I have, but all that I can borrow. [Laurence J. Peter]
ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
(3) is correct as per EJB Specs:

20.2 Enterprise Bean�s Environment as a JNDI Naming Context
3. The Deployer uses the tools provided by the container to create the environment entries that are declared in the enterprise bean�s deployment descriptor. The Deployer can set and modify the values of the environment entries.

Thanks

-- Ravi


SCJP, SCJD, SCWCD, SCBCD, SCEA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question ? - What do you think and Why
 
Similar Threads
Doubt in Enterprise Bean Environment
Question on Environment Entries
Environment
Enterprise Bean Environment question from ejbcertificate.com
a mock question