During the last two days, you studied session beans, which are the support provided by the EJB specification for writing and deploying transactional business components. Enterprise applications require transactional as well as persistence functionality. For persistence functionality, the EJB specification defines another type of bean called an entity bean. An entity bean represents the data logic part of an enterprise application. Entity beans are components that encapsulate database activities such as retrieving and storing data in a database. Entity beans interact with the database for persisting data in different ways depending on who is responsible for implementing the database functionality. The EJB specification defines two ways to implement database functionality for an entity bean:
There are pros and cons to each method and there are also applicability issues for entity beans. Through your lessons over these two days, you will become familiar with CMP and BMP. |