EJB session and entity context

What is an EJB Context?

EJBContext is an interface. This is implemented by the EJB container. This is also a part of bean-container contract. The subclass of EJBContext called EntityContext is used by entity beans. The bean class gets information about the container, client using the bean and the bean itself from the EJBContext objects.

What is the difference between sessioncontext and entitycontext?

Information like the current bean status, security credentials of the user is available in the EJB container. This information is available in one object called EJBContext object.

The information that a Session Bean needs from the EJB container is obtained using SessionContext.

The information that a Entity Bean needs from the EJB container is obtained using EntityContext.
EJB views
EJB views - Remote client view and Local client view
EJB types
EJB types - Different types of EJB, types of session beans, types of Entity beans, relationship between local interfaces and container-managed relationships
EJB roles
EJB roles - Describe the roles of EJB specification that are involved in the development and deployment of EJB application
Post your comment