• Post Reply Bookmark Topic Watch Topic
  • New Topic

Ejb Reference

 
Chenna Krishna
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
when do we use Ejb Reference ?
How does the Ejb Refrence work?
thanks in advance.
 
meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
EJB references are used in the ejb-jar.xml so that you can get a default initial context to lookup the bean, when both the caller and the callee beans are exiting on the same JVM.
Regards
Meka Toka
 
Sam Dalton
Author
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by meka toka:
Hi,
EJB references are used in the ejb-jar.xml so that you can get a default initial context to lookup the bean, when both the caller and the callee beans are exiting on the same JVM.
Regards
Meka Toka

This also allows you to abstract the name used in a beans code to look up another bean from the JNDI name with which that bean is deployed. You simply map the names via the EJB reference.
Cheers
Sam
 
Chenna Krishna
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answers...
Do I still need JNDI to lookup the object?
rgds
Krishna
 
Sam Dalton
Author
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you do.
Cheers
Sam
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!