Jakarta EE


Jakarta EE, formerly Java Platform, Enterprise Edition and Java 2 Platform, Enterprise Edition, is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web services. Jakarta EE applications are run on reference runtimes, which can be microservices or application servers, which handle transactions, security, scalability, concurrency and management of the components they are 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 created by Sun Microsystems 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.
After acquisition of [Sun Microsystems by Oracle Corporation|Sun was acquired in 2009], 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 could not agree with Oracle over the use of and Java trademarks. Oracle owns the trademark for the name "Java" and the platform was renamed from Java EE to Jakarta EE. The name refers to the largest city on the island of Java and also the capital of Indonesia, Jakarta. The name should not be confused with the former Jakarta Project which fostered a number of current and former Java projects at the Apache Software Foundation.
Platform versionReleaseSpecification SupportImportant Changes
Jakarta EE 11Data
Jakarta EE 10Removal of deprecated items in Servlet, Faces, CDI and EJB. CDI-Build Time.
JDK 11 support
Jakarta EE 9Java SE 8API namespace move from to
Jakarta EE 8Java SE 8Full compatibility with Java EE 8
Java EE 82017-08-31Java SE 8HTTP/2 and CDI based Security
Java EE 72013-05-28Java SE 7WebSocket, JSON and HTML5 support
Java EE 62009-12-10Java SE 6CDI managed Beans and REST
Java EE 52006-05-11Java SE 5Java annotations and Generics in Java
J2EE 1.42003-11-11J2SE 1.4WS-I interoperable web services
J2EE 1.32001-09-24J2SE 1.3Java connector architecture
J2EE 1.21999-12-17J2SE 1.2Initial specification release

Specifications

Jakarta EE includes several specifications that serve different purposes, like generating web pages, reading and writing from a database in a transactional way, and managing distributed queues.
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 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 Faces to bind components to beans and in Contexts and Dependency Injection to named beans, but can be used throughout the entire platform.

Web service specifications

Enterprise specifications

  • Jakarta Activation specifies an architecture to extend component Beans by providing data typing and bindings of such types.
  • Jakarta Contexts and Dependency Injection is a specification to provide a dependency injection container;
  • 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

  • Jakarta Validation: This package contains the annotations and interfaces for the declarative validation support offered by the Jakarta Validation API. Jakarta Validation provides a unified way to provide constraints on beans that can be enforced cross-layer. In Jakarta EE, Jakarta Persistence 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

In an attempt to limit the footprint of web containers, both in physical and in conceptual terms, the web profile was created, a subset of the Jakarta EE specifications. The Jakarta EE web profile comprises the following:
SpecificationJava EE 6Java EE 7Java EE 8
Jakarta EE 8
Jakarta EE 9
Jakarta EE 9.1
Jakarta EE 10Jakarta EE 11
Jakarta Servlet3.03.14.05.06.06.1
Jakarta Server Pages 2.22.32.33.03.14.0
Jakarta Expression Language 2.23.03.04.05.06.0
Jakarta Debugging Support for Other Languages 1.01.01.02.02.02.0
Jakarta Standard Tag Library 1.21.21.22.03.03.0
Jakarta Faces2.02.22.33.04.04.1
Jakarta RESTful Web Services 1.12.02.13.03.14.0
Jakarta WebSocket 1.01.12.02.12.2
Jakarta JSON Processing 1.01.12.02.12.1
Jakarta JSON Binding 1.12.03.03.0
Jakarta Annotations 1.11.21.32.02.13.0
Jakarta Enterprise Beans 3.1 Lite3.2 Lite3.2 Lite4.0 Lite4.0 Lite4.0 Lite
Jakarta Transactions 1.11.21.22.02.02.0
Jakarta Persistence 2.02.12.23.03.13.2
Jakarta Bean Validation1.01.12.03.03.03.1
Jakarta Managed Beans1.01.01.02.0N/a
Jakarta Interceptors1.11.21.22.02.12.2
Jakarta Contexts and Dependency Injection 1.01.12.03.04.04.1
Jakarta Dependency Injection1.01.01.02.02.02.0
Jakarta Security1.02.03.04.0
Jakarta Authentication1.01.12.03.03.1
Jakarta Concurrency3.03.1

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.

Jakarta EE

Referencing runtimeDeveloperJakarta EE 10 PlatformJakarta EE 9/9.1 Platform Compatible ProductsJakarta EE 9/9.1 Web Profile Compatible ProductsJakarta EE 8 Platform Compatible ProductsJakarta EE 8 Web Profile Compatible ProductsLicensing
GlassFishEclipse 7.0.0 6.0.0/ 6.1.0 6.0.0/ 6.1.0 5.1.0 5.1.0
Open LibertyIBM 22.0.0.13-beta, 23.0.0.3 21.0.0.12 21.0.0.12 19.0.0.6, 20.0.0.3 19.0.0.6, 20.0.0.3
WebSphere LibertyIBM 23.0.0.3 21.0.0.12 21.0.0.12 20.0.0.3 20.0.0.3
WildFlyRed Hat 27.0.0.Alpha5 23.0.1-Preview/25.0.0-Preview 23.0.1-Preview/25.0.0-Preview 18.0.0 18.0.0
JBoss EAPRed Hat 8.0.0 7.3.0 7.3.0
TomEEApache Software Foundation|Apache] 10.x 9.x 9.x 8.x 8.x
Payara ServerPayara Services Limited 6.2022.1 Alpha 4 6.2021.1 Alpha 1 5.22.0, 5.23.0 5.23.0
Thunisoft Application ServerBeijing Thunisoft Information Technology 3.0 2.8
JEUSTmaxSoft 8.5
InforSuite Application ServerShandong Cvicse Middleware 11 10
WebOTXNEC 12 11

Java EE

Referencing runtimeDeveloperJava EE 8 certified – FullJava EE 8 certified – WebJava EE 7 certified – FullJava EE 7 certified – WebJava EE 6 certified – Full
Official Oracle page for Java EE Compatibility.
Java EE 6 certified – WebJava EE 5 certifiedJ2EE 1.4 certifiedLicensing
GlassFish server Open Source EditionOracle v5.0 v5.0 v4.x v4.x v3.x and upward v3.x Web Profile v2.1.x
Oracle GlassFish ServerOracle 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 ServerOracle 14.1.1 12.2.1 v12c v10.3.5.0 v9
WildFlyRed 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 PlatformRed Hat v7.2 v7.0 v7.0 v6.0 v5
IBM WebSphere Application ServerIBM v9.x v9.x v8 v7
IBM WebSphere Application Server LibertyIBM 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 EditionIBM v3.0 v2.1
Apache GeronimoApache v3.0-beta-1 v2.0 v1.0
JEUSTmaxSoft v8 v7 v6 v5
Cosminexus Application ServerHitachi v10.0 v9
Fujitsu Interstage Application ServerFujitsu v12.0 v1 Azure/v10.1
WebOTXNEC
BES Application ServerBaolande v9.5-
Apache TomEEApache 7
Resin ServerCaucho v4.0
SiwpasOW2 v6.0
JOnASOW2 v5.3 rc1
SAP NetWeaverSAP v2.x
Oracle Containers for Java EEOracle
Oracle iPlanet Web ServerOracle Sun Java System Web Server
Oracle Application Server 10gOracle
Pramati ServerPramati Technologies v5.0
Trifork T4Trifork
Sybase Enterprise Application ServerSybase

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 Faces with Facelets. The example below uses Faces 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.

import java.io.Serializable;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import jakarta.inject.Inject;
@Named
@ViewScoped
public class UserEdit implements Serializable

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.

import java.util.List;
import jakarta.ejb.Stateless;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import jakarta.persistence.TypedQuery;
@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.

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
@Entity
public class User