• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about ejb-ref and jndi .. HELP!!

 
Ernest Lee
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when deploying each EJB, we need to specify the JNDI name (for example, /ejb/HelloWorld), then EJB client can use that JNDI name to do the look up for the EJB home.
context.lookup("ejb/HelloWorld");
so why is ejb-ref necessary for war and ejb jar file? Can we just use the JNDI name to the do lookup in EJB or JSP, etc.. or we will have to use ejb-ref-name?
what would be the difference between using ejb-ref-name and using ejb jndi name for lookup?
also, i saw code that use prefix the lookup name with java:/comp/env, some don't.. why? what should be the standard?
Thanks in advance.
 
Ernest Lee
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any one can help?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please download the ejb spec. It explains the meaning of various tags and how they are used.
It would be better if you post these types of queries to J2EE section. You will receive a quick response there.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic