File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes a mock question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "a mock question " Watch "a mock question " New topic

a mock question

chao cai
Ranch Hand

Joined: May 26, 2005
Posts: 154
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.

the answer is 1,5
why 3 is incorrect?

SCEA<br />SCJP 1.2<br />SCBCD<br />MCSD<br />IBM Certified Specialist RUP v2003<br />IBM Certified Solution Designer OOAD vUML2<br /> <br />Phone Number:86-010-82776427
Ådne Brunborg
Ranch Hand

Joined: Aug 05, 2005
Posts: 208
Hmm... tricky...

EJB 2.0 spec, page 413:
If the Bean Provider provides a value for an environment entry using the env-entry-value element, the value can be changed later by the Application Assembler or Deployer.

The deployment descriptor is a deliverable of the Bean Provider, and may be edited by the Application Assembler (spec page 458-9). The Deployer, however, reads the DD into the environment, and may edit the values in the environment, but he does not edit the DD file itself.

Page 415:
The Deployer can modify the values of the environment entries that have been previously set by the Bean Provider and/or Application Assembler, and must set the values of those environment entries for which no value has been specified.

In real life, the Deployer (or rather, the person who deploys) does edit the deployment descriptor - but in doing so he actually plays the part of the Application Assembler.

Entia non sunt multiplicanda praeter necessitatem
I agree. Here's the link:
subject: a mock question
It's not a secret anymore!