If you want something done right, sometimes you have to do it yourself. This is definitely true of building persistence into EJB 1.x systems. As you read in Chapter 5, EJB 1.x CMP is amazingly simple, but it is also amazingly simplistic. I have already spent enough time on the drawbacks of the model. To address these drawbacks, you may need to handle bean persistence yourself. This chapter tells you how to handle persistence on your own using the EJB bean-managed persistence (BMP) model. Even if you are interested in some form of container-managed persistence, you should spend some time with this chapter since I cover many issues common to all three EJB persistence models in this chapter. Furthermore, through an understanding of the detailed mechanics of the BMP model, you will have a better understanding of the magic you are taking for granted under container-managed models. |