• 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

EJB References question/ why this answer?

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i am doing mock exams on ejbcertificate.com..
got following question:

incorrect Which of the following statements regarding an enterprise bean's environment are correct? Enterprise Bean Environment

Incorrect, you chose answers 1, 4, 5. The correct answers are 1,5.

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.

Answers 1 and 5 are correct.

Answer 2 is incorrect because enterprise bean instances can only read the values of the environment entries at runtime and are not able to modify them. Answers 3 and 4 are incorrect because the deployment descriptor is used to define only the environment entries, as opposed to the values that the enterprise bean expects to be provided at runtime.


i didnt get why number 4 is wrong.... doesnt the DD contains also values for environment entries? we specify name, type and value...

am i missing something?

thanks in advance and regards
Marco
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, the question and the options are not very well worded, I admit. Option 4 is a little weird and if option 5 was not there, option 4 would be correct. The bean instance has to get values by going through JNDI interfaces and cannot get those values directly from the deployment descriptor. You can read section 20.2 of the EJB 2.1 specification for more details.
 
Legend has it that if you rub the right tiny ad, a genie comes out.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic