Implementing the BMP Entity Bean

This section discusses the implementation of the remote home interface StudentHome, remote interface Student, and the BMP bean class StudentEJB. We'll also discuss how to write the DAO and 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 of an entity bean contains methods to find the instances of a bean based on certain search criteria. The home interface for an entity bean may also contain home business methods. Listing 10.1 shows the StudentHome remote home interface.

Listing 10.1. The Full Text of day10/
 package day10; import javax.ejb.*; import java.util.Collection; ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.