• 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

JNDI access to J2EE components

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

This question is from HFSJ mock exam 11 Q.9

Which are DD elements that provide JNDI access to J2EE components?
(Choose all that apply.)
A. <ejb-ref>
B. <entity-ref>
C. <ejb-local-ref>
D. <session-ref>
E. <ejb-remote-ref>



The correct answer given is A, C (explanation : (servlet spec 9.11)-In addition, <ejb-local-ref> also provides the web app creator with a JNDI reference to J2EE components.)

but I feel the following code snippet will be used for declaring the JNDI access.

<env-entry>
<env-entry-name>rates/discountRate</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>10</env-entry-value>
</env-entry>



I don't see any of these tags available in the question options. Can someone please explain?

Thanks
Shobhan
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I don't see any of these tags available in the question options. Can someone please explain?


You are right env-entry also has to do with JNDI lookup, but according to the Servlet2.4 spec all of the following tags have to do with JNDI lookup:

SRV.13.1 Deployment Descriptor Elements
Syntax for looking up JNDI objects (env-entry, ejb-ref, ejb-local-ref, resource-ref, resource-env-ref)



Regards,
Frits
 
Shobhan Ganta
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Frits.
 
reply
    Bookmark Topic Watch Topic
  • New Topic