Using Server-Side Beans: The Remote Interface
As soon as the client has an EJB object, it can call that object's methods. These methods are simply implementations of the remote interface of the EJB component class. An EJB remote interface extends the interface javax.ejb.EJBObject and can define any method it wishes. However, the argument and return types for each method must be RMI- compatible, and each method must contain java.rmi.RemoteException in its throws clause. In addition, each method in an EJB remote interface must correspond exactly (in name, argument number and type, return type, and throws clause) to a matching method in the Enterprise JavaBean component class the interface represents.