Hi Everyone, Im an ejb newbie, what i want to know is, where are the home and remote interfaces implemented. The home interface has a create() method that returns a reference to the remote interface(is it?) In my project this create method is used in a delegate class to create an object of the remote interface(apparently its the class implementing the home interface)...my question is where is this class??..or once again, where are the home and remote interfaces implemented?
Thanks so much for the response Jaikiran, well actually in the project im working on, the Business Delegate Design Pattern is being used..so in the businessDelegateImplementation class(which implements the businessDelegate interface), a bean class method is called using a remote interface reference, what i want to know is: How are we able to access the methods in the bean class with a reference of type remote interface when the bean class DOESNT even implement the remote interface?
Originally posted by Ravissant Markandey: How are we able to access the methods in the bean class with a reference of type remote interface when the bean class DOESNT even implement the remote interface?
In EJB2.x when you implement a bean class you dont actually include the "implements MyEJBRemoteInterface" in the bean class definition. But, remember that the EJB that you implement are expected to implement the specs, which means that any method that is declared in the remote/local interface has to be present and implemented in the bean definition class. The application server while deploying the EJB will check whether the method that are mentioned in the remote/local interface are also present in the bean implementation class (the ejb-jar.xml will help the server in knowing which remote interface corresponds to which ejb-class). If the server finds that the bean implementation class does not have the methods which have been declared in the remote interface then it throws an exception while deploying.
Furthermore, the proxies (generated by the application server) that are returned to the client (in your case the business delegate) through JNDI lookup, will implement the remote/local interfaces.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: what implements the Home and Remote interfaces?