O'Reilly logo

WebLogic: The Definitive Guide by Avinash Chugh, Jon Mountjoy

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 11. Using CMP and EJB QL

WebLogic's EJB container supports container-managed EJB persistence based on the EJB 2.0 specification. When you deploy a CMP entity bean to WebLogic Server, the EJB container automatically handles updates to the EJB's persistent fields by concurrent transactions, synchronizes its state with the underlying database table(s), and manages its relationships with other EJB instances.

WebLogic provides a number of enhancements to the standard CMP requirements. These can be divided into two basic categories: those that provide additional architectural options and make EJB development more convenient, and those that can be used to tune an EJB's performance. In the first category, WebLogic lets you map container-managed fields to columns spread across multiple tables. During the development and prototyping stages, you can make WebLogic generate the necessary SQL tables for all entity beans and relationships defined in the EJB JAR. WebLogic does this by inspecting the information captured in the bean classes, as well as the abstract persistence schema and column mappings defined in the EJB deployment descriptors. In addition, you can ask WebLogic to validate the database schema expected by the EJB container at runtime.

WebLogic lets you defer certain tasks of the EJB container to the underlying database. For instance, if you've configured a remove operation on an entity bean to propagate to all related EJB instances, you can configure WebLogic so that it ...

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