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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.