Implementing the CMP Entity Bean

This section discusses the implementation of the remote home interface OrderHome, remote interface Order, and the CMP bean class OrderEJB. We'll also discuss how to write the deployment descriptors in detail.

Defining the Home Interface

The home interface provides methods for creating and removing enterprise beans. In addition, for entity beans, the home interface also contains methods to find the instances of bean based on certain search criteria. The home interface for an entity bean may contain home business methods. Listing 11.1 shows the OrderHome remote home interface.

Listing 11.1. The Full Text of day11/OrderHome.java
 package day11; import java.util.*; import java.rmi.*; import javax.ejb.*; public interface ...

Get Sams Teach Yourself EJB in 21 Days now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.