- Advantages of CMP Entity Beans over BMP Entity Beans
- CMP 2.0 Entity Bean Sample Application
- Step 1: Implementing the CMP 2.0 Address Entity Bean
- Step 2: Implementing the CMP 2.0 Roster Entity Bean
- Step 3: Implementing the CMP 2.0 Student Entity Bean
- Step 4: Implementing JSP Clients to Test CMP 2.0 Entity Beans
- Step 5: Packaging the CMP 2.0 Entity Beans as an ejb-jar File
- Step 6: Packaging the JSP As a Web Component
- Step 7: Deploying the CMP 2.0 Entity Bean Sample Application
- Step 8: Testing the Sample Application
- A Discussion of the Deployment Descriptor
- Summary
Summary
In this chapter we discussed the chief characteristics of CMP 2.0 entity beans, such as their ability to form complex relationships between entity beans, enforcement of their referential integrity, and support for the abstract persistence schema and the standard EJB Query Language. We also discussed reasons why CMP 2.0 entity beans are preferred over BMP entity beans, including enhanced portability, flexibility with persistence implementation, better performance, and reduced time-to-market. We spent the major portion of the chapter discussing the implementation of the StudentEJB, RosterEJB, and AddressEJB CMP 2.0 entity beans, and we showed how to deploy and run the sample application. We'll examine the Java Message Service (JMS) in the next chapter.