Summary

Well done! In three days (Days 5, 6, and 7), you've covered pretty much everything you need to know about writing EJBs. There's a little mopping up of relatively minor issues tomorrow, but you now well and truly have the essentials under your belt.

Today you saw how the n-tier architecture is subtly revised again, with the responsibility for persistence delegated downwards (into subclasses) to the EJB container-generated subclasses of the CMP Entity bean. You also learned that the lifecycle for CMP Entity beans is substantially the same as BMP Entity beans and, in general, there is less coding to be done in the lifecycle methods (ejbCreate(), ejbLoad(), ejbStore(), and ejbRemove()).

You now know that cmp-fields are defined in the deployment descriptor and correspond to primitive and to Serializable objects. They are represented in the CMP bean class as abstract getter and setter methods. You also know that cmr-fields work very much the same way but deal with references to the local interfaces of other Entity beans (or collections thereof). This is what makes local interfaces the basis of container-managed relationships.

Finally, you saw how to construct EJB QL queries and how to relate them to both finder methods and to the helper select methods.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.53.93