Can an EJB Remote interface extend other interfaces as well as javax.ejb.EJBObject?

Brian Keeton

As with other interfaces in Java, the remote interface can extend multiple interfaces. In fact, it's common to pull the business methods out of the remote interface and define them in a separate interface. This new interface can then be extended by the remote interface and implemented by the bean class. The advantage here is that now the compiler can do the checking for you to make sure the bean class is implementing the method signatures that are exposed by the remote interface. You wouldn't want the bean class to implement the remote interface directly because it would then be required to implement the methods from EJBObject. You'll see this referred to as using a "business interface" in Monson-Haefel's book.