|
||
|
Lesson 7
Objective
|
Entity beans
What are EJB Entity beans? |
|
|
An Entity bean is associated with some persistent information somewhere.
Entity bean: An EJB that is an object representation of a piece of persistent data.
The bean object actually has a one-to-one relationship with the information that is stored permanently. One of the other major differences between session and entity beans is that entity bean instances are shared between multiple clients. This is because multiple client programs may require access to the same data at the same time. Entity beans use transactions to prevent concurrent access by multiple clients from corrupting the values in the data inadvertently. Transactions are also required if other non-EJB programs are accessing the data simultaneously.
An example of an entity bean is a Customer, a BankAccount, or a Product that maps to rows in actual databases. Entity Bean - Quiz
Click the Quiz link below to make sure you understand the different types of beans.
In the next lesson, the deployment descriptor and the jar file used to package a bean will be discussed.
Entity Bean - Quiz |
||
|
|
||
