Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Local Clients for EJBs  RSS feed

 
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
Sheriff
Posts: 36406
454
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!