This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
it will be great if help me to get clarify my doubt.
As for java specification if we want to use the Handle ( interface as reference ) the object class should implement the Interface. How it is able to give the Remote Handle for Ejb Object without implementing the Remote Interface by Bean class.
The getHandle() method is invoked on the EJBObject which is associated with the bean. There is no need for the bean to be involved.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Joined: Nov 15, 2004
Hi Roger Chung-Wee
Here my doubt is how the container is able to identify the mapping between the bean class and relavant Remote interface , here we are not at all implementing our bean class with particular Remote even though how the container is able map.
Joined: Sep 29, 2002
Check out your ejb-jar.xml which defines the mapping of a bean type with its interfaces. A typical entry in like this.
So, the container will create a Hello EJBObject for the HelloBean instances.
The Bean class you have written is not the final class. The container will be generate a class which will extend your bean and implement the interfaces. There are other approaches as well.. As of Weblogic it follows the above said technique.
If you have weblogic and have a EJB application deployed you can see the files generated by the server