Generated by DeepSeek V3.2| Enterprise JavaBeans | |
|---|---|
| Name | Enterprise JavaBeans |
| Developer | Sun Microsystems (now Oracle Corporation) |
| Latest release version | EJB 3.2 |
| Latest release date | 2013 |
| Programming language | Java |
| Operating system | Cross-platform |
| Genre | Application server |
| License | GNU General Public License |
Enterprise JavaBeans. It is a server-side software component architecture within the Java Platform, Enterprise Edition specification, managed by the Java Community Process. The technology provides a framework for developing scalable, transactional, and secure multi-tier enterprise applications. Its primary goal is to encapsulate the business logic of an application, separating it from concerns like persistence and client communication.
Originally introduced by Sun Microsystems in 1997, the specification aimed to simplify the development of large-scale, distributed business systems. It became a core part of the J2EE platform, later renamed Java EE, and is now part of Jakarta EE under the stewardship of the Eclipse Foundation. The evolution from EJB 1.0 to EJB 3.2 involved significant simplification, most notably with the introduction of annotations and a shift towards Plain Old Java Object programming models. Major application server vendors like IBM WebSphere, Oracle WebLogic Server, and Red Hat JBoss provide implementations.
The architecture is fundamentally based on a distributed, component-based model where business logic runs within a managed environment. Key concepts include the EJB container, which provides the runtime environment, and the components themselves, which are deployed within it. The model enforces a clear separation between the bean provider, who writes the business logic, and the container provider, who supplies system-level services. This architecture integrates with other Java EE technologies such as Java Persistence API for data access and Java Message Service for asynchronous communication.
The specification defines several distinct bean types, each serving a different architectural purpose. Session beans, which can be stateless or stateful, represent a client's interaction with the server and encapsulate business processes. Message-driven beans act as asynchronous message consumers for the Java Message Service, enabling event-driven architectures. Earlier versions also included Entity beans for persistence, but these were largely superseded by the Java Persistence API and its entity classes in later specifications.
The EJB container is a crucial part of the runtime, providing a suite of declarative services to the components it hosts. These services include automatic transaction management adhering to the ACID properties, often coordinated via the Java Transaction API. The container also enforces security through integration with Java Authentication and Authorization Service, manages concurrency, and provides lifecycle management, instance pooling, and remote communication capabilities typically using RMI-IIOP. This allows developers to focus on business rules rather than intricate system-level plumbing.
Development involves creating bean classes and, optionally, business interfaces, which are then packaged into an EJB-JAR file or within an EAR file alongside other Java EE modules. The deployment process includes installing this archive into an application server like Apache TomEE or WildFly. Modern versions heavily utilize Java annotations for configuration, reducing the need for verbose XML deployment descriptors. Tools from Oracle Corporation, IBM, and the Eclipse IDE facilitate this development and deployment lifecycle.
Early versions, particularly EJB 2.x, were widely criticized for excessive complexity, requiring extensive XML configuration and leading to what was termed "heavyweight" development. This prompted the creation of simpler, competing frameworks like the Spring Framework from Pivotal Software, which offered an alternative container model. In response, EJB 3.0 adopted a much simpler, annotation-based approach, narrowing the gap. Today, alternatives also include MicroProfile for microservices and lighter-weight Jakarta EE technologies, with ongoing development managed by the Eclipse Foundation.
Category:Java enterprise platform Category:Server-side software Category:Software componentry