• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local Clients for EJBs

 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Can we have a normal java classes as local clients for local interfaces of the ejb.

I have used Session Beans as the local client for a CMP, it works only when i specify local-ref in ejb-jar.xml, otherwise it doesn't works, even if they are in the same jvm. Is defining local-ref mandadory for making local calls? If not how can we do it otherwise

thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34237
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prakash,
You can have a regular class only if it is running already in the container. Essentially this means that the regular class had to be called by a servlet or session bean at some point.

Yes, you need to define the local reference.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic