Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

a mock question

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic