Enterprise JavaBeans (EJBs) are the Java classes where you can write your business logic. Though it is not a strict requirement to use EJBs to write business logic, they do provide many of the services that are essential in enterprise applications. These services are security, transaction management, component lookup, object pooling, and so on.
You can have EJBs distributed across multiple servers and let the application container (also called the EJB container) take care of component lookup (searching component) and component pooling (useful for scalability). This can improve the scalability of the application.
EJBs are of two types:
- Session beans: Session beans are called directly by clients or middle-tier objects ...