• 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

IntialContext lookup vs EJBContext lookup

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Could you tell me whether IntialContext lookup vs EJBContext lookup methods are same or different, I mean i can use any one of the method for lookup ?

Thanks,
Lalit
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lalit,

i think that both lookup-methods are identical. See also the excerpt of MZ Notes:

A new method, "lookup", has been added to the javax.ejb.EJBContext interface. This method
can be used to lookup the resources or references bound in a bean's JNDI environment naming
context. The method's signature is:

The lookup method internally wraps a call to InitialContext.lookup() so that a developer doesn't
need to additionally learn the JNDI API.



You should be aware that InitialContext will always work, but for EJBContext, you 've to be inside the Container.
 
Lalit mishra
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic