jQuery in Action, 3rd edition
The moose likes EJB and other Java EE Technologies and the fly likes Local Clients for EJBs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Local Clients for EJBs" Watch "Local Clients for EJBs" New topic

Local Clients for EJBs

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
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


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: Local Clients for EJBs
jQuery in Action, 3rd edition