|
Answer» EJB or Enterprise Java Beans is one of the most important parts of the J2EE platform that helps to develop enterprise-level multi-tiered applications and deploy them by keeping in mind performance, scalability and robustness. EJBs can be used when we want to achieve the following: - Clustering: For deploying the application in a CLUSTER environment, EJBs can be used to achieve high availability and FAULT tolerance.
- Concurrency without using Threads: EJBs can be used to achieve concurrency without using actual threads since they are instantiated using the object pool and are available in the EJB container. This helps in achieving performance without involving complexities around Threads.
- Transaction management: EJBs can be used for achieving transaction management for databases by using annotations provided by EJB.
- Database CONNECTION Pool: EJB can access connection pools defined in the J2EE server. The connection pools help in achieving abstraction of database connectivity and operations.
- Security: EJBs use JAAS (Java Authentication and Authorization SERVICE) to develop secure applications. EJB methods can be authenticated and AUTHORISED with only configuration changes.
- Scheduler Service: EJBs can be used in the Timer Service which enables task implementation for further execution or repetitive execution.
|