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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.