Win a copy of Spark in Action this week in the Open Source Projects forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JNDI access to J2EE components

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • 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: 3348
303
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks Frits.
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic