What Are Entity Beans?


As the title of this chapter suggests, entity beans are responsible for managing persistence in an enterprise application. They are the data-centric component of the architecture. Persistence is the action of storing the state of the application, allowing it to be fully restored at a later time. The life span of persistent data extends past the system shutdown, allowing it to be restored in a subsequent execution. The state of the application is defined by the value of the objects' attributes. Some attributes are considered transient and do not take part in persistence of the application. The non-transient attributes contain the state information that must be maintained throughout system shutdowns and crashes. For example, a business application that maintains sales orders and inventory requires that these values are stored persistently.

The Java2 Enterprise Edition addresses the need for persistence through entity EJBs. When such a bean is deployed in BEA WebLogic Server, the persistent data typically resides in a relational database. The entity bean provides the object-relational mapping with the database management system (DBMS). In the multitiered architecture of an enterprise application, the business logic, provided by the session beans, uses the entity beans for persistent storage of application data.

Entity EJBs provide the following behavior for the enterprise application in that they

  • Represent persistent data throughout shutdowns and crashes

  • Are shared by multiple clients

  • Synchronously maintain persistent storage

  • Provide the object-relational mapping between the in-memory attributes of the entity bean and the persistent storage



BEA WebLogic Platform 7
BEA WebLogic Platform 7
ISBN: 0789727129
EAN: 2147483647
Year: 2003
Pages: 360

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