Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to do a lookup in JNDI ?  RSS feed

 
Eusebio Floriano
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • 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" ?
 
vikassheel gupta
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • 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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!