This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Could someone explain to me the difference between the following(From EJB3.0 Core specs):
-A reference to an enterprise beans business interface
-A reference to an enterprise beans remote interface.
-A reference to an enterprise beans local interface.
I thought there was only 2 kinds of interface..local and remote.What does the 1st one refer to...?
What is the difference between retrieving an EJBObject\EJBLocalObject as opposed to calling get BusinessObject(Class <T> businessInterface)?Are there differences in capabilities of the returned object or what?
Duran Harris wrote:Oh ok so we're actually supposed to refer to the remote interface as the 'business interface' in EJB3.0 to avoid confusion with EJB2.x?
If the bean exposes a EJB2.x view through an interface extending the EJBObject or through the <remote> element in the xml, then that interface is known as the remote (component) interface.
If the bean exposes a EJB3.x view through an interface marked with @Remote or <business-remote> element in the xml, then that interface is known as a remote (business) interface.
Same is the case with the "local" counterparts.
Duran Harris wrote:
But even though our interfaces no longer extend EJBObject and EJBLocalObject are the following 2 methods of the SessionContext still relevant to EJB3.0:
They will throw an IllegalStateException if the bean does not expose the remote (component) interface or the local (component) interface.