Chapter 1 - EJB 3.0
Enterprise JavaBeans technology is a J2EE technology for developing business components in a component-based, enterprise Java application.
Business components developed with EJB technology are often called Enterprise JavaBeans components or simply "enterprise beans."
Enterprise beans provide the logic and represent of the data that needs to perform operations specific to a business area such as banking or retail.
For example, an enterprise bean used the data and logic needed to perform banking account operations, such as crediting and debiting an account.
Other enterprise beans might be offer the data and logic needed to perform "shopping cart" operations that allow customers to purchase goods online from a retail store.
EJB technology is generally viewed as powerful and sophisticated.This applications built using EJB and other J2EE technologies are secure, scale to support very large numbers of simultaneous users, and are transaction-enabled so that data maintains its integrity even though it's processed concurrently by multiple users.
• Development of large scale enterprise level application.
• Application Server/ EJB container provides the system level services like transaction handling, logging, load balancing, persistence mechanism, exception handling.
• EJB container manages life cycle of ejb instances developer needs to create/delete ejb objects.
EJB are primarily of three types:
1. Session Bean - Session bean stores data of a user for a single session. It can be stateful or stateless. It is less resource intensive as compared to entity beans. Session bean gets destroyed as soon as user session terminates.
2. Entity Bean -Entity beans represents persistent data storage. User data can be saved to database via entity beans and later on can be retrived from the database in the entity bean.
3. Message Driven Bean - Message driven beans are used in context of JMS (Java Messaging Service). Message Driven Beans can consumes JMS messages from external entities.
EJB 3.0 Overview