O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Entity Beans

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.

Code Listing 50.1. Source Code for Customer.java
 package usingj2ee.shopping; import java.rmi.*; import javax.ejb.*; import java.util.Collection; import ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required