• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNDI Look up doubt  RSS feed

 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i came across the below code snippets in some training material



i understand that this is some thing involves JNDI lookup but i didn't understand the key the code is searching for.

"java:comp/env/ejb/SimpleConverter"

Any idea???
 
Masoud Kalali
Author
Ranch Hand
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java:comp/env is an standard prefix namespace for objects lookup in j2ee environment.

the next section for example /ejb/ is an standard subcontext name for EJB objects or /jms/ is standard subcontext for JMS stuff and so on.

so your lookup string should means : look for an EJB that its name is SimpleConverter within j2ee environment.
 
Alana Sparx
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing to note is that
"java:comp/env... "
should bring you the remote interfaces you are looking for. Local interfaces have a different jndi binding. Look for my name and local interface and unearth the happy tale of my discovery.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!