The first step in defining your entity beans is the creation of the Remote interfaces. If you did a thorough job in the design phase, you already know all the methods that you need in the Remote interface. If not, you'll probably change the interfaces many times before you get them right. To be honest, even if you modeled the system well, you're probably still going to make changes to the interfaces—but not as many. Listing 50.1 shows the Remote interface for the Customer bean. In addition to the basic data types, notice that the bean can return itself as a view object.
package usingj2ee.shopping; import java.rmi.*; import javax.ejb.*; import java.util.Collection; import ...