Types of EJB
Three types of EJB are available which are given below:
Session EJB – A Session EJB is useful for mapping business process flow (or equivalent application concepts). There are two sub-types of Session EJB — stateless and stateful Session EJBs commonly represent “pure” functionality that is created as it is needed.
Entity EJB – An Entity EJB maps a combination of data (or equivalent application concept) and associated functionality. Entity EJBs are usually based on an underlying data store and will be created based on that data within it.
Message-driven EJB – A Message-driven EJB is very similar in concept to a Session EJB, but is only activated when an asynchronous message arrives.