• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IntialContext lookup vs EJBContext lookup

 
Lalit mishra
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • 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
 
Christian Nicoll
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks for your reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic