This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Pipeline as Code and have Mohamed Labouardy on-line!
See this thread for details.
Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

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.
 
I can't beleive you just said that. Now I need to calm down with this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic