Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Resolving JNDI Names

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please brief me about resolving JNDI names in EJB3.

Especially I want to know the difference between Environmental naming context and Global JNDI names.

Thanks for your time.
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
From what I understand , ENC is a naming context local to the component deployed , you can co-relate the localness to the references (ejb-ref,resource-ref,resource-env-ref) in the ejb-jar.xml or web.xml . The reference names specified in these DD / annotations are apply to those components only . ENC uses the java:comp/env prefix automatically for its naming . Global JNDI names are specified by the deployer in a server implementation specific (maybe xml) file . The Global JNDI names should then be mapped to local ENC names by the deployer , in some cases the ENC references are resolved automatically by the server even if mapping between ENC & Global jndi doesnt exist.

I suppose ENC is used to make the application component independent of deployment time details . Hope this helps and is correct
Guys please correct me if I'm wrong .
 
reply
    Bookmark Topic Watch Topic
  • New Topic