Summary

As we mentioned in the introduction:

  • Try to use CMP whenever you can.

  • However, there are still situations where developers will be forced to develop BMP entity beans. Because the only meaningful difference between BMP and CMP components is who provides the persistence logic, BMPs offer quite a good deal of flexibility in developing components within the J2EE architecture, when functionality is not covered by CMP.

  • BMP are quite difficult and long to write. With abstractions and helper classes that we introduced in the code (environment variables from the deployment descriptor, separating the JDBC code in a persister helper class, subclassing a CMP 2.0 bean class), it is not too difficult.

Pros and cons of BMP entity beans

After seeing ...

Get EJB 2.0 Development with WebSphere Studio Application Developer 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.