O'Reilly logo

Java Database Best Practices by George Reese

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

Chapter 6. EJB BMP

Beings are, so to speak, interrogated with regard to their being. But if they are to exhibit the characteristics of their being without falsification, they must for their part have become accessible in advance as they are in themselves. The question of being demands that the right access to being be gained and secured in advance with regard to what it interrogates.

Martin Heidegger, Being and Time

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.

EJBs Revisited

As in the chapters before this one, I here assume that you have a basic understanding of Enterprise JavaBeans. Chapter 9 provides an introduction to Enterprise JavaBeans that you ...

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