7.5 EJB COMPONENTS

Just as Servlets run in a Servlet Container, EJBs run in an EJB container. The container itself could be either standalone or a part of an (Java EE) Application server. There are three types of EJBs—Session Beans, Entity Beans and Message driven Beans. A Bean, in general EJB parlance, is a component, but different from Java Beans. They are classified into these categories as per their specific functionalities they intend to achieve. Session Beans and Message driven Beans drive business logic (in slightly different ways) and Entity Beans manage persistence. Persistence can be achieved in different ways, but Java uses JPA (Java Persistence API) to deal with persistence, through the EntityManager interface. Most EJB containers ...

Get Web Technology: Theory and Practice now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.