• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JNDI Look up doubt

 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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???
 
Author
Posts: 531
Mac OS X Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic