• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Question ? - What do you think and Why

 
Ranch Hand
Posts: 120
  • 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.
 
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think 4 is correct. Answer 3 can also be correct as the <env-entry-value> can be set by either an application assembler or a deployer.

so i think 3 and 4 are correct.

thanks,
trupti
 
mini mehta
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by trupti nigam:
I think 4 is correct. Answer 3 can also be correct as the <env-entry-value> can be set by either an application assembler or a deployer.

so i think 3 and 4 are correct.

thanks,
trupti



I had the same feeling, but the www.ejbcertificate.com thinks :

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.
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Answer 3 may be wrong because it is the bean provider who defines the values for <env-entry>

But answer 4 should be correct. I feel even 1 is correct.

guys share your opinions???
 
Sujatha Kumar
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
to conclude 1,4 and 5 are correct answers
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,


4. Enterprise bean instances obtain the values of the environment entries from the enterprise bean's deployment descriptor.



I think 4 is incorrect because Enterprise bean instances do not obtain the values of the environment entries from the enterprise bean's deployment descriptor but rather from the its special environment (i.e. its jndi subcontext "java:comp/env"). Environment entries are defined in the deployment descriptor, once ejb-jar is deployed into the app server environment entries get associated with the jndi names, and these are the names that ejb instances use to look environment entry value up.


3. The deployer sets and modifies the values of the environment entries by editing the enterprise bean's deployment descriptor.



I think 3 is a correct answer as deployer must ensure that <env-entry-value> contains a legal value. Please see paragraph 20.2.3 on page 415


All right, my answers to this question would be 1, 3 and 5.
 
mini mehta
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sujatha Kumar:
to conclude 1,4 and 5 are correct answers



Why do u think 3 is wrong?
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See also https://coderanch.com/t/158833/java-EJB-SCBCD/certification/ejbcertificate-com
 
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(3) is correct as per EJB Specs:

20.2 Enterprise Bean�s Environment as a JNDI Naming Context
3. The Deployer uses the tools provided by the container to create the environment entries that are declared in the enterprise bean�s deployment descriptor. The Deployer can set and modify the values of the environment entries.

Thanks

-- Ravi
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic