Bean-Container and Container-Server Contract

From
Jump to navigation Jump to search

This section specifies the container-managed persistence contract between an entity bean and its container.

File:Example.jpg

An enterprise bean is an object whose class is provided by the Bean Provider. The class of an entity bean with container-managed persistence is abstract. The concrete bean class is generated by the Container Provider’s tools at deployment time. The container is also responsible for providing the implementation of the java.util.Collection classes that are used in maintaining the container-managed relationships of the entity bean.

An entity EJBObject or EJBLocalObject is an object whose class was generated at deployment time by the Container Provider’s tools. A client never references an entity bean instance directly—a client always references an entity EJBObject or EJBLocalObject whose class is generated by the Container Provider’s tools. The entity EJBObject class implements an entity bean’s remote interface. The entity EJBLocalObject class implements an entity bean’s local interface. A related entity bean never references another entity bean instance directly—a related entity bean, like any other local client of an entity bean, always references an entity EJBLocalObject whose class is generated by the Container Provider’s tools.

An entity EJBObject or EJBLocalObject is an object whose class was generated at deployment time by the Container Provider’s tools. A client never references an entity bean instance directly—a client always references an entity EJBObject or EJBLocalObject whose class is generated by the Container Provider’s tools. The entity EJBObject class implements an entity bean’s remote interface. The entity EJBLocalObject class implements an entity bean’s local interface. A related entity bean never references another entity bean instance directly—a related entity bean, like any other local client of an entity bean, always references an entity EJBLocalObject whose class is generated by the Container Provider’s tools.