Enterprise Java Beans (EJB) tutorials. Focusing on EJB 3.0 (EJB3) and above.
The EJB container is an interface b/w enterprise bean which provides the business logic in the Java EE server or a Java EE application. EJB container is run at the Java EE server & it manages the application's enterprise beans execution. EJB Container
When to Use EJB Distributed transactions are needed.Component security needed.Persistence needed.Integration along with the legacy applications are needed.Scalability is needed.
When not use EJB When one doesn’t require application integration, transactions or other infrastructure like facilities in their application.
EJB Advantages To access EJB free security is provided.Declarative transactions are provided.EJBs are cached & pooled. Containers manage the EJB life cycles.Remote access capabilities are present & are clustered for sake of scalability.OO concepts are supported for example inheritance.Usage of attributes or annotation based programming is possible.Free usage & access of complex resources
EJB Disadvantages Complicated and large specificationIncreased
Architecture of EJB is given below. 3 kinds of interfaces are exposed by the help of EJB which are as following:
1. Home interface
2. Remote interface
3. JMS Message Listener Interface EJB Architecture
EJB is multi tier system that is distributed & remote. It supports the protocols for example, HTTP, IIOP and JRMP etc. Rapid development of the versatile, reusable and portable business components takes place across the scalable, middle ware and transactional applications. For J2EE servers, EJB is considered as a specification. System level programming and business logic are present in EJB components for example security, threading, transactions, instance pooling, persistence etc which are managed
Updated 01-15-2012 at 07:50 AM by EJB