Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

relation between ejb--jar.xml and web.xml?

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
web.xml has <ejb-ref> and <ejb-local-ref> tags. which way we can use them?.
mostly in books they mentioned about ejbb-jar.xml only?
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yamini,

web.xml has <ejb-ref> and <ejb-local-ref> tags. which way we can use them?.
mostly in books they mentioned about ejbb-jar.xml only?


In ejb-jar.xml, <ejb-ref> and <ejb-local-ref> declare a reference to another enterprise bean�s home and local home, respectively. The referencing bean can then lookup for those homes using JNDI, under the java:comp/env context.

Now when a Web component such a servlet (and not another bean) wants to reference an EJB, the reference is declared in web.xml, using exactly the same syntax (ejb-ref or ejb-local-ref) .

Regards,

Phil.
[ August 17, 2004: Message edited by: Philippe Maquet ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic