WebLogic s Support for Entity Beans

WebLogic's Support for Entity Beans

Apart from the support for the EJB 2.0 specification that you learned about on Day 10, "Stateful Session Beans," you might revisit some of the other points discussed on that day and take a look at the entity bean related and persistence-related support provided by WebLogic Server 7.0. The following new features of the EJB 2.0 specification for entity beans, which are supported by WebLogic Server 7.0, will be covered today and tomorrow:

  • New design for container managed persistence (CMP) The biggest drawback in the EJB 1.1 specification was the CMP design. To a certain extent, the limitations found in the CMP design of the EJB 1.1 specification have been overcome in the new CMP design of the EJB 2.0 specification. The most important change is its support for container-managed relationships between entity beans.

  • EJB-QL language to query EJBs in CMP To support the new CMP model of container-managed relationships, the EJB 2.0 specification defines a meta-language called EJB-Query Language (EJB-QL).

  • Local interfaces for entity beans to improve performance From the viewpoint of developers who worked with the EJB 1.1 specification, a major drawback was the poor performance of accessing EJBs, especially entity beans within the same JVM (Java Virtual Machine). The EJB 2.0 specification provides a concept called local interfaces for entity beans. Local interfaces are used to write EJBs that can be accessed within the same JVM. This avoids the overheads associated with accessing a bean in a JVM that also uses the remote interface. Both session and entity beans can implement a local interface.

  • Dynamic query support Dynamic queries allow you to construct and execute queries programmatically in your application code. No longer do all finder queries need to be static and hard-coded into an EJB's deployment descriptor. This gives you the ability to create and execute new queries without having to update and redeploy an EJB. Dynamic queries also reduce the size of the EJB's deployment descriptor. See "Dynamic Queries" for more information on dynamic queries.

  • EJB CMP multiple table mapping support Multiple table mapping allows you to map a single EJB to multiple DBMS tables within a single database. You can use the WebLogic Server-specific CMP container's XML deployment descriptors to map multiple DBMS tables and columns to the EJB and its fields. See the "CMP Relationship" section for EJB 2.0 CMP for more information on multiple table mapping.

  • EJB WebLogic QL enhancements support Included in this release of WebLogic Server is a set of enhancements to the WebLogic QL query language. WebLogic QL is a WebLogic-specific extension of the EJB 2.0 Query Language known as EJB QL. This enhancement supports the following features:

    • Optimistic concurrency support Optimistic concurrency support is a new concurrency strategy offered by WebLogic Server. It provides optimistic support with or without caching. The EJB guarantees that the data is consistent by making sure that it was not modified before committing the transaction.

    • Bulk insert update support Bulk insert update support increases the performance of CMP bean creation by enabling the EJB container to perform multiple database inserts for CMP beans in one SQL statement. This feature allows the container to avoid multiple database inserts.



Sams Teach Yourself BEA WebLogic Server 7. 0 in 21 Days
Sams Teach Yourself BEA WebLogic Server 7.0 in 21 Days
ISBN: 0672324334
EAN: 2147483647
Year: 2002
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net