• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resolving JNDI Names

 
Kalyana Sundaram
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.
 
bernard savary
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 .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic