• Post Reply Bookmark Topic Watch Topic
  • New Topic

If EJB Jar and WAR is in the same EAR file  RSS feed

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi


I'm full of doubts so I'd just like to ask. If your EJB and Webapp is in the same EAR file, then is it unnecessary to make a JNDI lookup? Thanks!
 
Rejeev Divakaran
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Even if the EJB and Web modules are part of the same EAR, you need to use JNDI lookup to get the Home interface preferably through [ejb-ref] tag in the web.xml . Also you have to use Remote interface (not local interface). Most of the application servers provide optimizations if the EJB client is part of the same application (For WebLogic refer the tag enable-call-by-reference).
 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it. Thanks Rejeev!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!