However, this approach requires sophisticated functionality in the container. When a client invokes a method on an EJB object, the container locates the associated entity bean instance if it exists, or transfers an instance from the pooled state. Entity beans in the ready state can receive business method invocations propagated to them from the client by delegation. They can also execute and methods when requested by the container. The purpose of the load and store methods is to maintain data consistency between the entity bean and the underlying data store.
Entity beans support multiple users with concurrent access to data.
The enterprise bean developer writes the methods assuming that the container will ensure appropriate synchronization for entity beans that are accessed concurrently from multiple transactions. The container typically accomplishes this either by locking the data in the database and serializing accesses, or by creating multiple instances of the entity bean and allowing concurrency control in the underlying data store to manage the accesses. Specification 1.0 . Server Component Model for the Java Platform by Anne Thomas, Patricia Seybold Group. Learn more about Java technology and EJB architecture at the Sun Web site.