Client programs communicate with the database through the application server using high-level and platform independent calls. The application server responds to the client requests, makes database calls as needed into the underlying database, and replies to the client program as appropriate. An Enterprise Bean that implements a business entity is an entity Bean , and an Enterprise Bean that implements a business task is a session Bean. Typically, an entity Bean represents one row of persistent data stored in a database table. In the auction house example, RegistrationBean is an entity Bean that represents data for one registered user, and AuctionItemBean is an entity Bean that represents the data for one auction item.
Entity Beans are transactional and long-lived.
As long as the data remains, the entity Bean can access and update that data. This does not mean you need a Bean running for every table row. Instead, Enterprise Beans are loaded and saved as needed. A session Bean might execute database reads and writes, but it is not required. A session Bean might invoke the JDBC calls itself or it might use an entity Bean to make the call, in which case the session Bean is a client to the entity Bean.