O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

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

Specifying a CMP Entity Bean

Specifying a CMP Entity bean is identical to specifying a BMP Entity bean; it consists of defining the local-home interface and the local interface. This makes sense; after all, to the user of the bean, it should not matter whether the bean is implemented internally using CMP or BMP.

The Local-Home Interface

For completeness, Listing 7.2 is the local-home interface of the Job bean.

Listing 7.2. JobLocalHome Interface
 1: package data; 2: 3: import java.rmi.*; 4: import java.util.*; 5: import javax.ejb.*; 6: 7: public interface JobLocalHome extends EJBLocalHome 8: { 9: JobLocal create (String ref, String customer) throws CreateException; 10: JobLocal findByPrimaryKey(JobPK key) throws FinderException; 11: Collection ...

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