eWebProgrammer eweb  

Entity Beans   «Prev  Next»
Lesson 2Entity bean architecture
Objective Describe the architecture of an entity bean.
Entity Bean Definition
An entity bean is associated with some persistent information somewhere. It can be thought of as an in-memory representation of the persistent data. The bean has a one-to-one relationship with this unique piece information. This means that there is a single bean, within a home, that represents the persistent information. Multiple beans and other non-Java programs can access the bean concurrently. These multiple accessors use transactions to coordinate their activities.
Multiple clients can access a single entity bean. Clients of entity beans have a many- to-one relationship with the bean instance. The bean instance will use transactions to control concurrent access from multiple clients. This is illustrated in the diagram below.
Entity Bean
In the diagram, Client-A and Client-B are accessing the same bean instance and, thus, the same data. Client-C is accessing a different bean instance. You can see that the container keeps track of the client connections by keeping track of the network end point for each of the clients.
The next lesson introduces the characteristics of entity beans.