• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions on Local EJB

 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm new to EJB and I have few questions regarding local EJB.
1. Is that true that standalone (not inside enterprise app) web or client apps can't access local EJB? If no, then how to do the JNDI lookup? As far as I know, there's no way to provide the EJB JNDI for local EJB. Please correct me if I'm wrong.

2. If for example, the web module and EJB module are inside the enterprise application, how is it possible for the web module to access the local EJB inside the EJB module. I know we need to provide <ejb-local-ref> in web.xml, but once again, how to do the JNDI lookup? Or it's not necessary anymore to do JNDI lookup?

3. Is the EJB JNDI vendor-specific? In Sun Java System App Server, it's something like


Hope my questions are clear enough. Thanks a lot.
 
Senthil NathanS
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi


See we also need to do a jndi lookup for local EJB also.The only thing is we dont want to narrow the object which we have recieved.Correct me if I am wrong.
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First you cannot access local interfaces by standalone client.local interfaces are accesses by container only.
if you want to access local interfaces use session bean.
What i maean to say that call local interfaces through session bean(session facade design pattern).
i.e standalone client will access session bean using jndi.
session bean will access local interfaces.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic