Jakarta EE
, formerly Java Enterprise Edition and Java 2 Platform, Enterprise Edition is a set of specifications, extending Java SE 8 with specifications for enterprise features such as distributed computing and web services. Jakarta EE applications are run on reference runtimes, that can be microservices or application servers, which handle transactions, security, scalability, concurrency and management of the components it is deploying.
Jakarta EE is defined by its specification. The specification defines APIs and their interactions. As with other Java Community Process specifications, providers must meet certain conformance requirements in order to declare their products as Jakarta EE compliant.
Examples of contexts in which Jakarta EE referencing runtimes are used are: e-commerce, accounting, banking information systems.
History
The platform was known as Java 2 Platform, Enterprise Edition or J2EE from version 1.2, until the name was changed to Java Platform, Enterprise Edition or Java EE in version 1.5.Java EE was maintained by Oracle under the Java Community Process. On September 12, 2017, Oracle Corporation announced that it would submit Java EE to the Eclipse Foundation.
The Eclipse top-level project has been named Eclipse Enterprise for Java. The Eclipse Foundation was forced to change the name because Oracle owns the trademark for the name "Java" and renamed the Java EE platform to Jakarta EE. The name should not be confused with the former Jakarta Project which fostered a number of current and former Java projects at the the Apache Software Foundation.
- J2EE 1.2
- J2EE 1.3
- J2EE 1.4
- Java EE 5
- Java EE 6
- Java EE 7
- Java EE 8
- Jakarta EE 8
- Jakarta EE 9
Specifications
The Jakarta EE APIs include several technologies that extend the functionality of the base Java SE APIs, such as Jakarta Enterprise Beans, connectors, servlets, Jakarta Server Pages and several web service technologies.
Web specifications
- Jakarta Servlet: defines how to manage HTTP requests, in a synchronous or asynchronous way. It is low level and other Jakarta EE specifications rely on it;
- Jakarta WebSocket: API specification that defines a set of APIs to service WebSocket connections;
- Jakarta Server Faces: a technology for constructing user interfaces out of components;
- Jakarta Expression Language is a simple language originally designed to satisfy the specific needs of web application developers. It is used specifically in Jakarta Server Faces to bind components to beans and in Contexts and Dependency Injection to name beans, but can be used throughout the entire platform.
Web service specifications
- Jakarta RESTful Web Services provides support in creating web services according to the Representational State Transfer architectural pattern;
- Jakarta JSON Processing is a set of specifications to manage information encoded in JSON format;
- Jakarta JSON Binding provides specifications to convert JSON information into or from Java classes;
- Jakarta XML Binding allows mapping XML into Java objects;
- Jakarta XML Web Services can be used to create SOAP web services.
Enterprise specifications
- Jakarta Contexts and Dependency Injection is a specification to provide a dependency injection container, as in Spring;
- Jakarta Enterprise Beans specification defines a set of lightweight APIs that an object container will support in order to provide transactions, remote procedure calls, concurrency control, dependency injection and access control for business objects. This package contains the Jakarta Enterprise Beans classes and interfaces that define the contracts between the enterprise bean and its clients and between the enterprise bean and the ejb container.
- Jakarta Persistence are specifications about object-relational mapping between relation database tables and Java classes.
- Jakarta Transactions contains the interfaces and annotations to interact with the transaction support offered by Jakarta EE. Even though this API abstracts from the really low-level details, the interfaces are also considered somewhat low-level and the average application developer in Jakarta EE is either assumed to be relying on transparent handling of transactions by the higher level EJB abstractions, or using the annotations provided by this API in combination with CDI managed beans.
- Jakarta Messaging provides a common way for Java programs to create, send, receive and read an enterprise messaging system's messages.
Other specifications
- Validation: This package contains the annotations and interfaces for the declarative validation support offered by the Bean Validation API. Bean Validation provides a unified way to provide constraints on beans that can be enforced cross-layer. In Jakarta EE, JPA honors bean validation constraints in the persistence layer, while JSF does so in the view layer.
- Jakarta Batch provides the means for batch processing in applications to run long running background tasks that possibly involve a large volume of data and which may need to be periodically executed.
- Jakarta Connectors is a Java-based tool for connecting application servers and enterprise information systems as part of enterprise application integration. This is a low-level API aimed at vendors that the average application developer typically does not come in contact with.
Web profile
The Jakarta EE web profile comprises the following:
Specification | Java EE 6 | Java EE 7 | Java EE 8 Jakarta EE 8 | Jakarta EE 9 |
Jakarta Servlet | 3.0 | 3.1 | 4.0 | 5.0 |
Jakarta Server Pages | 2.2 | 2.3 | 2.3 | 3.0 |
Jakarta Expression Language | 2.2 | 3.0 | 3.0 | 4.0 |
Jakarta Debugging Support for Other Languages | 1.0 | 1.0 | 1.0 | 2.0 |
Jakarta Standard Tag Library | 1.2 | 1.2 | 1.2 | 2.0 |
Jakarta Server Faces | 2.0 | 2.2 | 2.3 | 3.0 |
Jakarta RESTful Web Services | 1.1 | 2.0 | 2.1 | 3.0 |
Jakarta WebSocket | 1.0 | 1.1 | 2.0 | |
Jakarta JSON Processing | 1.0 | 1.1 | 2.0 | |
Jakarta JSON Binding | 1.1 | 2.0 | ||
Jakarta Annotations | 1.1 | 1.2 | 1.3 | 2.0 |
Jakarta Enterprise Beans | 3.1 Lite | 3.2 Lite | 3.2 Lite | 4.0 Lite |
Jakarta Transactions | 1.1 | 1.2 | 1.2 | 2.0 |
Jakarta Persistence | 2.0 | 2.1 | 2.2 | 3.0 |
Jakarta Bean Validation | 1.0 | 1.1 | 2.0 | 3.0 |
Jakarta Managed Beans | 1.0 | 1.0 | 1.0 | 2.0 |
Jakarta Interceptors | 1.1 | 1.2 | 1.2 | 2.0 |
Jakarta Contexts and Dependency Injection | 1.0 | 1.1 | 2.0 | 3.0 |
Jakarta Dependency Injection | 1.0 | 1.0 | 1.0 | 2.0 |
Jakarta Security | 1.0 | 2.0 | ||
Jakarta Authentication | 1.0 | 1.1 | 2.0 |
Certified referencing runtimes
Although by definition all Jakarta EE implementations provide the same base level of technologies, they can differ considerably with respect to extra features, installed size, memory footprint, startup time, etc.Referencing runtime | Developer | Java EE 8 certified – Full | Java EE 8 certified – Web | Java EE 7 certified – Full | Java EE 7 certified – Web | Java EE 6 certified – Full Official Oracle page for Java EE Compatibility. | Java EE 6 certified – Web | Java EE 5 certified | J2EE 1.4 certified | Licensing |
GlassFish server Open Source Edition | Oracle | v5.0 | v5.0 | v4.x | v4.x | v3.x and upward | v3.x Web Profile | v2.1.x | ||
Oracle GlassFish Server | Oracle | v3 based on the open source GlassFish application server | Sun Java System Application Server v9.0 | Sun Java System Application Server v8.2 | ||||||
Oracle WebLogic Server | Oracle | 14.1.1 | 12.2.1 | v12c | v10.3.5.0 | v9 | ||||
WildFly | Red Hat | v14.x | v14.x | v8.1 | v8.0.0.Final | v7.1 | v6.0 and v7.0 | v5.1 | v4.x | |
JBoss Enterprise Application Platform | Red Hat | v7.2 | v7.0 | v7.0 | v6.0 | v5 | ||||
IBM WebSphere Application Server | IBM | v9.x | v9.x | v8 | v7 | |||||
IBM WebSphere Application Server Liberty | IBM | v18.0.0.2 | v18.0.0.2 | v8.5.5.6 | v8.5.5.6 | v8.5.5 | ||||
IBM | v18.0.0.2 | v18.0.0.2 | ||||||||
IBM WebSphere Application Server Community Edition | IBM | v3.0 | v2.1 | |||||||
Apache Geronimo | Apache | v3.0-beta-1 | v2.0 | v1.0 | ||||||
JEUS | TmaxSoft | v8 | v7 | v6 | v5 | |||||
Cosminexus Application Server | Hitachi | v10.0 | v9 | |||||||
:ja:Interstage|Fujitsu Interstage Application Server | Fujitsu | v12.0 | v1 Azure/v10.1 | |||||||
:ja:WebOTX|WebOTX | NEC | |||||||||
BES Application Server | Baolande | v9.5 | - | |||||||
Apache TomEE | Apache | 7 | ||||||||
Resin Server | Caucho | v4.0 | ||||||||
Siwpas | OW2 | v6.0 | ||||||||
JOnAS | OW2 | v5.3 rc1 | ||||||||
SAP NetWeaver | SAP | v2.x | ||||||||
Oracle Containers for Java EE | Oracle | |||||||||
Oracle iPlanet Web Server | Oracle | Sun Java System Web Server | ||||||||
Oracle Application Server 10g | Oracle | |||||||||
Pramati Server | Pramati | v5.0 | ||||||||
Trifork T4 | Trifork | |||||||||
Sybase Enterprise Application Server | Sybase |
Code sample
The code sample shown below demonstrates how various technologies in Java EE 7 are used together to build a web form for editing a user.In Jakarta EE a UI can be built using Jakarta Servlet, Jakarta Server Pages, or Jakarta Server Faces with Facelets. The example below uses JSF and Facelets. Not explicitly shown is that the input components use the Jakarta EE Bean Validation API under the covers to validate constraints.
xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core">
Example Backing Bean class
To assist the view, Jakarta EE uses a concept called a "Backing Bean". The example below uses and Jakarta Enterprise Beans.@Named
@ViewScoped
public class UserEdit
Example Data Access Object class
To implement business logic, Jakarta Enterprise Beans is the dedicated technology in Jakarta EE. For the actual persistence, JDBC or Jakarta Persistence can be used. The example below uses EJB and JPA. Not explicitly shown is that JTA is used under the covers by EJB to control transactional behavior.@Stateless
public class UserDAO
Example Entity class
For defining entity/model classes Jakarta EE provides the Jakarta Persistence, and for expressing constraints on those entities it provides the Bean Validation API. The example below uses both these technologies.@Entity
public class User