Entity Beans  «Prev  Next»

Lesson 7

Entity Bean Client Conclusion

This module introduced the client side of the entity bean client.
You learned how the home interface provides a create() method to create both the bean instance and the underlying data. Subsequent lessons introduced the findByPrimaryKey() method It is the way that the client requests the home interface to find a particular entity and associate it with a bean instance.
You were shown how, once the bean was found, to call the bean's business methods, and to remove the bean. The final lessons introduced the identity of the entity bean instances and how to compare them.
The next module discusses the home and remote interfaces of an entity bean.

Thus, the EJB container acts as a layer of indirection between the client code and the bean. This layer of indirection manifests itself as a single network aware object called the EJB object. The EJB object is the request interceptor.
The EJB object is a surrogate object that knows about networking, transactions, security, and more. It is an intelligent object that knows how to perform intermediate logic that the EJB container requires before a method call is serviced by a bean class instance. An EJB object is the request interceptor, or the glue, between the client and the bean. EJB objects replicate and expose every business method that the bean itself exposes. EJB objects delegate all client requests to beans. We depict EJB objects in Figure 4.7


Figure 4-7 : EJB Objects

BMP - Exercise

Click the Exercise link below to complete the next part of the course project in which you create an instance of an entity bean.
BMP - Exercise