Implementing the Container Callback Methods

No matter which persistence method an entity bean uses, it has to implement the EntityBean interface. This means that you’re still required to implement the same callback methods when you use CMP as you do for BMP. The difference is in what you’re responsible for doing within these methods. An exception to this comment applies to finder methods, which aren’t implemented at all within a CMP bean class. This is because the container is completely responsible for their implementation. You’ll see later in the “Deploying an Entity Bean Using CMP” section how queries are defined for finder methods.

A common restriction to remember as the various callback methods are discussed is that you can’t declare your ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.