Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

environment entry values

 
sonali rao
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • 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.
 
Dilli raj
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • 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 ]
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic