• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to do a lookup in JNDI ?

 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to know how i can do a lookup in JNDI. I mean
When do i have to use "java:/comp/env...." instead of just "myBean" ?
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
regarding your question there is no need to show "java:env/.........."just to show ur bean name in the lookup fine
when u want to call ur bean u have to look up ur bean
and when u want o user ur data source u have to look up ur data source fine

Homeinterface ref=(Homeinterface)PortableRemoteObject.narrow(ctx.lookup("Bean which we used "), Homeinterface.class);
then we have to use ref any time when we have to call any bean method
fine
I think this will help u
reply
    Bookmark Topic Watch Topic
  • New Topic