• 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

environment entry values

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I came across the following statements in a mock exam. 1. The deployer sets and modifies the values of the environment entries by editing the enterprise bean's deployment descriptor.
2. Enterprise bean instances obtain the values of the environment entries from the enterprise bean's deployment descriptor.
Answer given: Both the statements are false. Why is it so? I thought the deployer is responsible for setting the values of the environment entries and that the bean instances obtain these values from the deployment descriptor.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the first question. Even the Bean provider can set the values of the environment entries. But it is the responsibility of the Deployer to make sure that the values are present
Dilli
[ February 18, 2004: Message edited by: Dilli raj ]
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Definitely wrong. The bean provider adds the initial env-entries to the descriptor. The application assembler modifies their values. I'd argue that there isn't a deployer responsibility here at all, at least not from the standpoint of being examined on the spec. From a software engineering workflow standpoint, yes, it would be good for the deployer to know what was supposed to be in the descriptor, and throw the ejb-jar back in the lap of the application assembler if something is missing, but the spec isn't testing us on our ideas for ways to create a deployment workflow with appropriate safeguards. The exam simply wants us to know the conceptual responsibilities of the various roles.
2 Definitely wrong. The bean gets the environment values via JNDI, not via the deployment descriptor. The container uses the deployment descriptor to populate the bean's private JNDI context, but the bean is oblivious to how that is done.
reply
    Bookmark Topic Watch Topic
  • New Topic