• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why java:comp/env

 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have tried to underdstand by googling why we need to prefix "java:comp/env" with JNDI name every time we lookup,but still i am not very sure about this.
Can someone please explain this in simple terms so that a new guy in the JAVA world can understand.

thanks,
Ajse
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What that is is called the environment-naming context (or ENC for short). This is used to provide a reference to a resource in JNDI that is constant, regardless of where it is in JNDI. Different containers can bind resources in different places in the JNDI namespace, and the ENC is used to provide a reference to that position.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic