Hubbry Logo
Jakarta EEJakarta EEMain
Open search
Jakarta EE
Community hub
Jakarta EE
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something
Jakarta EE
Jakarta EE
from Wikipedia
Jakarta EE
Jakarta EE logo schooner color stacked default
Player softwareJava
Programming language(s)Java
Application(s)Application server
StatusActive
LicenseEclipse Public License or GNU General Public License w/Classpath exception
Websitejakarta.ee

Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE[1] with specifications for enterprise features such as distributed computing and web services.[2] 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 (application programming interface) 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

[edit]

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 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.[3] The Eclipse top-level project has been named Eclipse Enterprise for Java (EE4J).[4] The Eclipse Foundation could not agree with Oracle over the use of javax and Java trademarks.[5] Oracle owns the trademark for the name "Java" and the platform was renamed from Java EE to Jakarta EE.[6][7] The name refers to the largest city on the island of Java and also the capital of Indonesia, Jakarta.[8] 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.

Java enterprise platform history
Platform version Release[9] Specification Java SE Support Important Changes
Jakarta EE 11 Planned for June/July 2024 11 Java SE 21 Data
Jakarta EE 10 2022-09-22[10] 10
  • Java SE 17
  • Java SE 11
Removal of deprecated items in Servlet, Faces, CDI and EJB (Entity Beans and Embeddable Container). CDI-Build Time.
Jakarta EE 9.1 2021-05-25[11] 9.1
  • Java SE 11
  • Java SE 8
JDK 11 support
Jakarta EE 9 2020-12-08[12] 9 Java SE 8 API namespace move from javax to jakarta
Jakarta EE 8 2019-09-10[13] 8 Java SE 8 Full compatibility with Java EE 8
Java EE 8 2017-08-31 JSR 366 Java SE 8 HTTP/2 and CDI based Security
Java EE 7 2013-05-28 JSR 342 Java SE 7 WebSocket, JSON and HTML5 support
Java EE 6 2009-12-10 JSR 316 Java SE 6 CDI managed Beans and REST
Java EE 5 2006-05-11 JSR 244 Java SE 5 Java annotations and Generics in Java
J2EE 1.4 2003-11-11 JSR 151 J2SE 1.4 WS-I interoperable web services[14]
J2EE 1.3 2001-09-24 JSR 58 J2SE 1.3 Java connector architecture[15]
J2EE 1.2 1999-12-17 1.2 J2SE 1.2 Initial specification release

Specifications

[edit]

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

[edit]
  • 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 (EL) 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 (backing) beans and in Contexts and Dependency Injection to named beans, but can be used throughout the entire platform.

Web service specifications

[edit]

Enterprise specifications

[edit]
  • Jakarta Activation (JAF) specifies an architecture to extend component Beans by providing data typing and bindings of such types.
  • Jakarta Contexts and Dependency Injection (CDI) is a specification to provide a dependency injection container;
  • Jakarta Enterprise Beans (EJB) specification defines a set of lightweight APIs that an object container (the EJB container) will support in order to provide transactions (using JTA), remote procedure calls (using RMI or RMI-IIOP), 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 (JPA) are specifications about object-relational mapping between relation database tables and Java classes.
  • Jakarta Transactions (JTA) 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 (JMS) provides a common way for Java programs to create, send, receive and read an enterprise messaging system's messages.

Other specifications

[edit]
  • 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 (e.g. Jakarta Persistence model classes) 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 (EIS) as part of enterprise application integration (EAI). This is a low-level API aimed at vendors that the average application developer typically does not come in contact with.

Web profile

[edit]

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:

Specification Java EE 6[16] Java EE 7[17] Java EE 8[18]
Jakarta EE 8[19]
Jakarta EE 9[20]
Jakarta EE 9.1[21]
Jakarta EE 10[22] Jakarta EE 11
Jakarta Servlet 3.0 3.1 4.0 5.0 6.0 6.1
Jakarta Server Pages (JSP) 2.2 2.3 2.3 3.0 3.1 4.0
Jakarta Expression Language (EL) 2.2 3.0 3.0 4.0 5.0 6.0
Jakarta Debugging Support for Other Languages (JSR-45) 1.0 1.0 1.0 2.0 2.0 2.0
Jakarta Standard Tag Library (JSTL) 1.2 1.2 1.2 2.0 3.0 3.0
Jakarta Faces 2.0 2.2 2.3 3.0 4.0 4.1
Jakarta RESTful Web Services (JAX-RS) 1.1 2.0 2.1 3.0 3.1 4.0
Jakarta WebSocket (WebSocket) 1.0 1.1 2.0 2.1 2.2
Jakarta JSON Processing (JSON-P) 1.0 1.1 2.0 2.1 2.1
Jakarta JSON Binding (JSON-B) 1.1 2.0 3.0 3.0
Jakarta Annotations (CA) 1.1 1.2 1.3 2.0 2.1 3.0
Jakarta Enterprise Beans (EJB) 3.1 Lite 3.2 Lite 3.2 Lite 4.0 Lite 4.0 Lite 4.0 Lite
Jakarta Transactions (JTA) 1.1 1.2 1.2 2.0 2.0 2.0
Jakarta Persistence (JPA) 2.0 2.1 2.2 3.0 3.1 3.2
Jakarta Bean Validation 1.0 1.1 2.0 3.0 3.0 3.1
Jakarta Managed Beans 1.0 1.0 1.0 2.0 N/a
Jakarta Interceptors 1.1 1.2 1.2 2.0 2.1 2.2
Jakarta Contexts and Dependency Injection (CDI) 1.0 1.1 2.0 3.0 4.0 4.1
Jakarta Dependency Injection 1.0 1.0 1.0 2.0 2.0 2.0
Jakarta Security 1.0 2.0 3.0 4.0
Jakarta Authentication 1.0 1.1 2.0 3.0 3.1
Jakarta Concurrency 3.0 3.1

Certified referencing runtimes

[edit]

Although by definition all Jakarta EE implementations provide the same base level of technologies (namely, the Jakarta EE spec and the associated APIs), they can differ considerably with respect to extra features (like connectors, clustering, fault tolerance, high availability, security, etc.), installed size, memory footprint, startup time, etc.

Jakarta EE

[edit]
Referencing runtime[23][24][25] Developer Jakarta EE 10 Platform Jakarta EE 9/9.1 Platform Compatible Products Jakarta EE 9/9.1 Web Profile Compatible Products Jakarta EE 8 Platform Compatible Products Jakarta EE 8 Web Profile Compatible Products Licensing
GlassFish Eclipse Yes 7.0.0 Yes 6.0.0/ 6.1.0 Yes 6.0.0/ 6.1.0 Yes 5.1.0 Yes 5.1.0 Free software
Open Liberty IBM Yes 22.0.0.13-beta,[26] 23.0.0.3[27] Yes 21.0.0.12 Yes 21.0.0.12 Yes 19.0.0.6, 20.0.0.3 Yes 19.0.0.6, 20.0.0.3 Free software
WebSphere Liberty IBM Yes 23.0.0.3[27] Yes 21.0.0.12 Yes 21.0.0.12 Yes 20.0.0.3 Yes 20.0.0.3 Proprietary software
WildFly Red Hat Yes 27.0.0.Alpha5 Yes 23.0.1-Preview/25.0.0-Preview Yes 23.0.1-Preview/25.0.0-Preview Yes 18.0.0 Yes 18.0.0 Free software
JBoss EAP Red Hat Yes 8.0.0 No No Yes 7.3.0 Yes 7.3.0 Free software
TomEE Apache Yes 10.x Yes 9.x Yes 9.x Yes 8.x Yes 8.x Free software
Payara Server Payara Services Limited Yes 6.2022.1 Alpha 4 Yes 6.2021.1 Alpha 1 No Yes 5.22.0, 5.23.0 Yes 5.23.0 Free software
Thunisoft Application Server Beijing Thunisoft Information Technology No Yes 3.0 No Yes 2.8 No Proprietary software
JEUS TmaxSoft No No No Yes 8.5 No Proprietary software
InforSuite Application Server Shandong Cvicse Middleware No Yes 11 No Yes 10 No Proprietary software
WebOTX NEC Yes 12 No No Yes 11 No Proprietary software

Java EE

[edit]
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 Yes v5.0[28] Yes v5.0[28] Yes v4.x[29] Yes v4.x[29] Yes v3.x and upward[30] Yes v3.x Web Profile Yes v2.1.x[30] Free software
Oracle GlassFish Server Oracle Yes v3[31] based on the open source GlassFish application server Yes Sun Java System Application Server v9.0 Yes Sun Java System Application Server v8.2 Proprietary software
Oracle WebLogic Server Oracle Yes 14.1.1[32] Yes 12.2.1[33] Yes v12c[34] Yes v10.3.5.0 Yes v9 Proprietary software
WildFly Red Hat Yes v14.x[28] Yes v14.x[28] Yes v8.1 [35] Yes v8.0.0.Final Yes v7.1[36] Yes v6.0[37] and v7.0[38] Yes v5.1[39][40] Yes v4.x Free software
JBoss Enterprise Application Platform Red Hat Yes v7.2 [41] Yes v7.0[29] Yes v7.0[29] Yes v6.0[42] Yes v5 Proprietary software
IBM WebSphere Application Server IBM Yes v9.x[28] Yes v9.x[29] Yes v8[43] Yes v7 Yes Proprietary software
IBM WebSphere Application Server Liberty IBM Yes v18.0.0.2[44] Yes v18.0.0.2[44] Yes v8.5.5.6[45][46] Yes v8.5.5.6[29] Yes v8.5.5[47] Proprietary software
Open Liberty IBM Yes v18.0.0.2 Yes v18.0.0.2 Free software
IBM WebSphere Application Server Community Edition IBM Yes v3.0 Yes v2.1 Proprietary software
Apache Geronimo Apache Yes v3.0-beta-1[48][49] Yes v2.0 Yes v1.0 Free software
JEUS TmaxSoft Yes v8 Yes v7[50][51] Yes v6 Yes v5 Proprietary software
Cosminexus Application Server Hitachi Yes v10.0[28] Yes v9[52] Proprietary software
Fujitsu Interstage Application Server[53] Fujitsu Yes v12.0[28] Yes v1 Azure/v10.1[54][55] Yes Proprietary software
WebOTX NEC Yes[56] Yes Proprietary software
BES Application Server Baolande Yes v9.5[29]
Apache TomEE[57][58] Apache No 7 (Java EE 7 like, but not certified[59]) Yes Free software
Resin Server Caucho Yes v4.0[60] Yes Proprietary software
Siwpas OW2 Yes v6.0[61] Free software
JOnAS OW2 Yes v5.3 rc1[62] Yes Yes Free software
SAP NetWeaver SAP Yes v2.x[63] Yes Yes Proprietary software
Oracle Containers for Java EE Oracle Yes Proprietary software
Oracle iPlanet Web Server Oracle Yes Sun Java System Web Server Proprietary software
Oracle Application Server 10g Oracle Yes Proprietary software
Pramati Server Pramati Technologies Yes v5.0 Proprietary software
Trifork T4 Trifork Yes Proprietary software
Sybase Enterprise Application Server[64] Sybase Yes Proprietary software

Code sample

[edit]

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 (web) UI can be built using Jakarta Servlet, Jakarta Server Pages (JSP), or Jakarta Faces (JSF) 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.

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core">

    <f:metadata>
        <f:viewParam name="user_id" value="#{userEdit.user}" converter="#{userConvertor}" />
    </f:metadata>

    <h:body>

        <h:messages />

        <h:form>
            <h:panelGrid columns="2">
                <h:outputLabel for="firstName" value="First name" />
                <h:inputText id="firstName" value="#{userEdit.user.firstName}" label="First name" />

                <h:outputLabel for="lastName" value="Last name" />
                <h:inputText id="lastName" value="#{userEdit.user.lastName}" label="Last name" />

                <h:commandButton action="#{userEdit.saveUser}" value="Save" />
            </h:panelGrid>
        </h:form>

    </h:body>
</html>

Example Backing Bean class

[edit]

To assist the view, Jakarta EE uses a concept called a "Backing Bean". The example below uses Contexts and Dependency Injection (CDI) and Jakarta Enterprise Beans (EJB).

import java.io.Serializable;

import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import jakarta.inject.Inject;

@Named
@ViewScoped
public class UserEdit implements Serializable {
    private static final long serialVersionUID = 1L;

    private User user;

    @Inject
    private UserDAO userDAO;

    public String saveUser() {
        userDAO.save(this.user);
        addFlashMessage(String.format("User %d saved", this.user.getId()));

        return "users.xhtml?faces-redirect=true";
    }

    public void setUser(User user) {
        this.user = user;
    }

    public User getUser() {
        return user;
    }
}

Example Data Access Object class

[edit]

To implement business logic, Jakarta Enterprise Beans (EJB) is the dedicated technology in Jakarta EE. For the actual persistence, JDBC or Jakarta Persistence (JPA) 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 {
    @PersistenceContext
    private EntityManager entityManager;

    public void save(User user) {
        entityManager.persist(user);
    }

    public void update(User user) {
        entityManager.merge(user);
    }

    public List<User> getAll() {
        return entityManager.createNamedQuery("User.getAll", User.class)
                            .getResultList();
    }
}

Example Entity class

[edit]

For defining entity/model classes Jakarta EE provides the Jakarta Persistence (JPA), 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 {
    @Id
    @GeneratedValue(strategy = IDENTITY)
    private Integer id;

    @Size(min = 2, message="First name too short")
    private String firstName;

    @Size(min = 2, message="Last name too short")
    private String lastName;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }
}

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
Jakarta EE (Jakarta Enterprise Edition) is an open-source platform specification extending the Java programming language to develop portable, scalable, and cloud-native enterprise applications. It provides standardized APIs and components for building robust server-side software, including web services, messaging, data persistence, and security, enabling interoperability across compatible implementations. Originally known as Java EE (Java Platform, Enterprise Edition), it evolved from specifications first introduced by Sun Microsystems in 1999 as J2EE to support enterprise-level Java development. In 2017, Oracle contributed the Java EE assets to the Eclipse Foundation to foster open-source innovation and vendor neutrality, leading to the rebranding as Jakarta EE in 2018 due to trademark restrictions on the "Java" name by Oracle. This transition marked a shift toward faster release cycles, community-driven governance, and alignment with modern paradigms like microservices and containerization. The Eclipse Foundation's Jakarta EE Working Group, comprising global organizations and developers, oversees the platform's evolution through a charter emphasizing frequent updates, simplified certification, and broad ecosystem participation. The platform aggregates numerous specifications, such as Jakarta Servlet for web handling, Jakarta Persistence (JPA) for object-relational mapping, Jakarta CDI for dependency injection, and Jakarta Messaging for asynchronous communication, ensuring applications can run on certified servers like Eclipse GlassFish or Apache TomEE. As of November 2025, the latest release is Jakarta EE 11, finalized on June 26, 2025, which requires Java SE 17 or higher and introduces support for Java Records, virtual threads, and the new Jakarta Data 1.0 specification while pruning legacy features like ManagedBeans and the SecurityManager requirement. This version enhances developer productivity for cloud-native environments, with backward compatibility for prior releases via namespace mappings from javax.* to jakarta.* packages.

Overview

Definition and Scope

Jakarta EE is an open-source specification suite that evolved from Java EE, serving as the evolution of enterprise Java technologies under the governance of the Eclipse Foundation since 2017. It focuses on enabling cloud-native, lightweight, and traditional enterprise Java applications by providing standardized APIs for building scalable, secure, and reliable server-side software. Managed through the vendor-neutral Jakarta EE Working Group, it emphasizes rapid innovation and compatibility with modern deployment environments like microservices, Docker, and Kubernetes. The scope of Jakarta EE centers on extending the Java SE platform with server-side APIs for key enterprise functionalities, including web technologies, business logic processing, data persistence, and system integration, without constituting a complete software distribution. It includes specifications for services such as messaging, transactions, security, and persistent data management, organized into modular profiles: Core Profile for foundational elements, Web Profile adding web application support, and Full Platform incorporating advanced features like batch processing and messaging. This modularity allows developers to select subsets of APIs tailored to application needs, promoting portability across compatible runtimes. A key aspect of Jakarta EE is its adoption of the jakarta.* namespace starting with version 9, replacing the previous javax.* packages to distinguish it from Oracle-controlled Java EE while maintaining backward compatibility where possible. It requires Java SE 11 or later as a baseline, with recent releases such as Jakarta EE 11 updating the minimum to Java SE 17 or higher to leverage features like virtual threads and records. This ensures applications can run portably and scalably on certified runtimes that pass the Technology Compatibility Kit (TCK), guaranteeing adherence to the specifications across diverse vendors.

Key Features and Benefits

Jakarta EE emphasizes modularity through its profiles, enabling developers to select lightweight subsets tailored for specific needs, such as the Core Profile for microservices or the full platform for comprehensive enterprise applications. This approach allows for flexible, scalable deployments without requiring the entire stack, promoting efficiency in resource-constrained environments like cloud-native setups. A core strength lies in its built-in support for Contexts and Dependency Injection (CDI), which automates dependency management and lifecycle handling, fostering loosely coupled components that simplify testing and maintenance. Annotations enable declarative programming, reducing the need for verbose XML configurations, while the JSON Processing API facilitates efficient handling of modern data formats in web and enterprise applications. Compared to legacy Java EE, these features significantly cut boilerplate code, streamlining development workflows and enhancing productivity. Portability across multiple vendor implementations ensures consistent behavior and long-term stability, allowing applications to migrate seamlessly between compatible runtimes without vendor lock-in. Alignment with contemporary Java features, such as records in Jakarta EE 11, further integrates immutable data structures to minimize code verbosity and improve type safety. Security is bolstered by native integration with OAuth 2.0 via OpenID Connect support in Jakarta Security, enabling secure authentication for distributed systems, alongside the removal of the deprecated SecurityManager in EE 11 to simplify runtime configurations while preserving robust protection mechanisms. For cloud-native performance, Jakarta EE optimizes deployments with reactive messaging capabilities that support non-blocking, event-driven architectures for high-throughput scenarios, and RESTful services through the JAX-RS API for building scalable APIs. These elements collectively enable enterprises to achieve better resource utilization, faster response times, and easier scaling in containerized environments, making it ideal for microservices and hybrid cloud strategies.

History

Origins in Java EE

The Java 2 Platform, Enterprise Edition (J2EE) was initially released by Sun Microsystems on December 17, 1999, as version 1.2, establishing a standardized framework for developing multi-tier enterprise applications using Java technologies. This release introduced core components such as Enterprise JavaBeans (EJB) for business logic, Java Servlets for web handling, and JavaServer Pages (JSP) for dynamic content generation, aiming to address the complexities of distributed computing while promoting portability across vendor implementations. Over the subsequent years, the platform evolved through iterative updates, with J2EE 1.3 in 2001 and 1.4 in 2003 enhancing messaging, web services, and integration capabilities, but these versions retained verbose configuration requirements that increased development overhead. A significant advancement occurred with the rebranding to Java EE 5 in May 2006, which introduced annotations and a simplified programming model to reduce boilerplate code and XML descriptors, making enterprise development more accessible and aligned with plain old Java object (POJO) paradigms. Key milestones in this release included the EJB 3.0 specification, which enabled POJO-based enterprise beans by minimizing invasive interfaces and callbacks, allowing developers to focus on business logic rather than container-specific details. Similarly, JavaServer Faces (JSF) 1.2 provided a component-based framework for building web user interfaces, supporting event-driven interactions and reusable UI components to streamline front-end development. The Java Persistence API (JPA) 1.0 emerged as the standard for object-relational mapping (ORM), offering a portable way to manage entity persistence without tying applications to proprietary persistence solutions. Following Sun Microsystems' acquisition by Oracle Corporation, completed on January 27, 2010, Oracle assumed stewardship of Java EE, continuing its evolution under the Java Community Process (JCP). Under Oracle's leadership, the platform advanced to Java EE 8, released on August 31, 2017, which incorporated modern features such as HTTP/2 support in Servlet 4.0 for improved web performance and the JSON Binding (JSON-B) API for efficient mapping between Java objects and JSON data structures. However, this era also highlighted challenges, including perceptions of vendor lock-in due to Oracle's influence over implementations like GlassFish and the introduction of proprietary extensions that deviated from pure specifications, fostering concerns about long-term openness and interoperability. These issues ultimately contributed to the platform's transition to open governance.

Transition to Eclipse Foundation

In September 2017, Oracle, in collaboration with IBM and Red Hat, announced the donation of Java EE technologies—including specifications, reference implementations, and Technology Compatibility Kits (TCKs)—to the Eclipse Foundation to accelerate innovation amid enterprises' shift to cloud-native models and to foster broader open-source collaboration. The transfer necessitated a rebranding, as Oracle retained control over the "Java" trademark and did not grant permission for its use under Eclipse governance; consequently, in February 2018, following a community poll with over 6,900 votes, the platform was renamed Jakarta EE. The inaugural release, Jakarta EE 8 in September 2019, mirrored Java EE 8 in functionality while retaining the javax.* package namespace to ensure backward compatibility for existing applications and libraries. To guide the platform's community-driven evolution, the Eclipse Foundation established the Jakarta EE Working Group in early 2018, with initial strategic members including IBM, Red Hat, Oracle, Fujitsu, Payara Services, and Tomitribe, responsible for specification development, branding promotion, and ecosystem coordination through open processes. Among the early hurdles in this handover were the complexities of relicensing over 30 projects to the Eclipse Public License 2.0 and adapting TCKs for compatibility certification under community oversight, which required building new infrastructure for testing and builds. The transition also foreshadowed namespace challenges, culminating in the mandatory shift from javax.* to jakarta.* packages in subsequent releases like Jakarta EE 9, which demanded widespread code refactoring in applications and dependencies to resolve import conflicts and maintain interoperability.

Major Releases and Evolution

Jakarta EE 8, released on September 10, 2019, marked the first version under the Eclipse Foundation's stewardship and maintained full binary compatibility with its predecessor, Java EE 8. This release incorporated the same set of specifications as Java EE 8, including updates such as Contexts and Dependency Injection (CDI) 2.0 for improved dependency management and Bean Validation 2.0 for enhanced constraint validation, without introducing new features but establishing a collaborative governance model for future evolution. The platform remained compatible with Java SE 8, ensuring a smooth transition for existing enterprise applications while laying the groundwork for namespace changes in subsequent versions. Jakarta EE 9, finalized on December 8, 2020, focused primarily on the mandatory adoption of the jakarta.* namespace across all specifications, replacing the former javax.* packages to resolve trademark issues and enable independent evolution. This release introduced no new APIs or features, emphasizing migration compatibility and requiring updates to build tools and codebases, while maintaining support for Java SE 8. A minor update, Jakarta EE 9.1, arrived on May 25, 2021, adding certification compatibility with Java SE 11 to align with evolving JVM standards. These changes were essential for decoupling from legacy dependencies and fostering broader community contributions. The release of Jakarta EE 10 on September 22, 2022, represented a significant advancement by introducing new specifications and enhancements tailored to modern development needs. It also featured updates to REST-related technologies, such as JSON Processing (JSON-P) 2.1 for better streaming support and improved HTTP client capabilities, alongside a baseline requirement for Java SE 11. Additionally, Jakarta EE 10 debuted the Core Profile, a lightweight subset of specifications designed for cloud-native and MicroProfile compatibility, promoting modular deployments. Jakarta EE 11, completed with its full platform release on June 26, 2025, followed a phased rollout beginning with the Core Profile in December 2024 and the Web Profile in March 2025, enabling incremental adoption. This version updated 16 specifications and introduced support for Java records for concise data modeling, while removing reliance on the deprecated SecurityManager in line with Java SE 21 advancements. Notable enhancements encompassed modernized testing frameworks for improved automation and OAuth 2.0 flows in Jakarta Security for secure authorization, alongside expanded compatibility with Java SE 21 to leverage virtual threads and other performance optimizations. These updates emphasize developer productivity and lightweight runtimes suitable for containerized environments. The evolution of Jakarta EE continues to prioritize cloud-native capabilities, with the 2025 Eclipse Foundation Developer Survey indicating 58% adoption among enterprise Java developers and a rise in modular, cloud-oriented deployments from 31% in 2024. This trend underscores growing integration with microservices and Kubernetes, positioning Jakarta EE as a key enabler for scalable, resilient applications in contemporary infrastructures.

Specifications

Web Specifications

The web specifications in Jakarta EE provide the foundational APIs for developing dynamic web applications, focusing on handling HTTP interactions, generating content, and managing user interfaces within the web tier. These specifications are integral to the Jakarta EE Web Profile, which targets lightweight web application development. In Jakarta EE 11, released on June 26, 2025, the web specifications have been updated to align with Java SE 17 and 21, incorporating support for modern Java features such as records and virtual threads while enhancing performance and security. Jakarta Servlet 6.1 serves as the core mechanism for processing HTTP requests and responses in web applications. It defines a server-side API that enables developers to create servlets—Java classes that extend the functionality of web servers—along with filters for intercepting requests and asynchronous processing to handle long-running operations without blocking threads. Key enhancements in version 6.1 include deprecation of HTTP/2 push support and improved alignment with Jakarta EE 11's baseline for cloud-native deployments. Jakarta Pages 4.0, formerly known as Jakarta Server Pages (JSP), offers a templating technology for generating dynamic web content by combining static markup like HTML or XML with embedded Java code, expression language expressions, and custom tag libraries. This specification compiles pages into servlets at runtime or deployment, facilitating reusable components and separation of presentation logic from business logic. In Jakarta EE 11, version 4.0 introduces refinements for better integration with contemporary Java features, emphasizing simplicity in web view rendering. Jakarta Faces 4.1 provides a component-based framework for building user interfaces in model-view-controller (MVC) web applications, allowing developers to create reusable UI components, manage state across requests, and handle events such as form submissions. It supports integration with WebSocket for real-time bidirectional communication, enabling features like live updates in web applications. The update to 4.1 in Jakarta EE 11 enhances integration with Contexts and Dependency Injection (CDI), including making the current Flow injectable via CDI and requiring CDI lifecycle events for @ViewScoped and @FlowScoped scopes, while deprecating unused events related to legacy custom scopes removed in earlier versions, further streamlining development and improving testability. Jakarta Expression Language 6.0 defines a lightweight scripting language for embedding dynamic expressions within web pages, JSP tags, or JSF components, supporting operations on objects, arrays, and maps without full Java code. It facilitates value binding and method invocation in a concise syntax, such as ${expression} for immediate evaluation. Version 6.0 adds support for Java records and Optional types, enhancing expressiveness in modern web templating. These web specifications integrate seamlessly with Jakarta Contexts and Dependency Injection (CDI) 4.1, which enables declarative dependency injection into servlets, filters, and other web components, promoting loose coupling and easier maintenance in the web tier. CDI's interceptors and decorators further allow cross-cutting concerns like logging or security to be applied uniformly across web layers.

Web Services Specifications

Jakarta EE's Web Services Specifications enable the development of interoperable, service-oriented APIs that facilitate communication between distributed applications, emphasizing standards for REST, SOAP, real-time interactions, and data serialization while integrating security for endpoint protection. These specifications build on HTTP and related protocols to support modern enterprise integration without delving into core web container handling. Jakarta RESTful Web Services (JAX-RS) 4.0 provides a standardized API for creating and consuming RESTful web services using annotations to map Java methods to HTTP resources. Developers can define resource classes with annotations such as @Path for URI mapping, @GET for retrieval operations, and @POST for resource creation, allowing automatic serialization and deserialization of request/response payloads. The specification supports hypermedia as the engine of application state (HATEOAS) through link representations and includes client-side APIs for invoking remote services. A key enhancement in version 4.0 is the introduction of reactive client support, enabling asynchronous, non-blocking interactions via integration with reactive programming models like those in Jakarta Concurrency. This allows for scalable handling of high-throughput scenarios in microservices architectures. Jakarta JSON Binding (JSON-B) 3.0 offers a binding layer for converting between Java objects and JSON documents, essential for REST API payloads in web services. It defines a default mapping algorithm that automatically handles type conversions, such as mapping Java beans to JSON objects and collections to arrays, using annotations like @JsonbProperty for customization. The API includes JsonbBuilder for creating binding instances and supports adapters for complex types, ensuring portability across implementations. Version 3.0 aligns with Java SE 11 requirements and introduces improvements in performance for large-scale data serialization, making it suitable for efficient API data exchange in service-oriented applications. Jakarta SOAP Web Services (JAX-WS) 4.0, part of the broader Jakarta XML Web Services, enables the creation of XML-based SOAP web services with support for Web Services Description Language (WSDL) contracts. It provides annotations like @WebService to expose Java interfaces as SOAP endpoints and tools for generating client stubs from WSDL documents, ensuring interoperability with legacy and enterprise systems. The specification includes handlers for message processing and attachments via Jakarta SOAP with Attachments (SAAJ), allowing secure, reliable messaging through WS-* standards. Aligned with Jakarta EE 11, version 4.0 requires Java SE 17 or higher and focuses on namespace updates to jakarta.xml.ws for consistency. Jakarta WebSocket 2.2 defines APIs for full-duplex, bidirectional communication over a single TCP connection, ideal for real-time web applications such as chat systems or live updates in service endpoints. Server endpoints are implemented using annotated classes extending Endpoint or implementing MessageHandler, with methods triggered by events like @OnMessage for incoming data. The client API supports connecting to remote WebSocket servers and handling sessions, compliant with RFC 6455. Version 2.2 updates the namespace to jakarta.websocket and includes extensions for programmatic endpoint configuration, enhancing scalability for push-based services in distributed environments. Security for web service endpoints in Jakarta EE is provided through Jakarta Authentication 3.1, which offers a pluggable SPI for authentication mechanisms integrated with service containers. It allows developers to define custom authenticators using AuthConfigFactory and ServerAuthModule to protect REST or SOAP endpoints, supporting mechanisms like HTTP Basic, OAuth, or custom tokens. This specification ensures portable security configurations across compliant runtimes, with propagation of caller identities to downstream services.

Enterprise Specifications

Jakarta Enterprise Specifications form the core of Jakarta EE for handling business logic, data persistence, and transactional integrity in scalable applications. These specifications enable developers to build modular, maintainable components that integrate seamlessly within the Jakarta EE platform, supporting features like dependency management and validation without relying on proprietary implementations. They emphasize standardization to promote portability across certified runtimes, with updates in recent versions focusing on namespace migration to jakarta.* and compatibility with modern Java SE versions. Jakarta Enterprise Beans (EJB) 4.0.1 defines an architecture for developing component-based business applications, providing simplified mechanisms for session beans and message-driven beans enhanced by interceptors. Session beans encapsulate business logic, allowing stateless, stateful, or singleton instances to handle client requests efficiently, while message-driven beans process asynchronous messages from messaging systems like JMS, with interceptors enabling cross-cutting concerns such as security and logging to be applied modularly. The specification requires Java SE 17 or higher and introduces the jakarta.* namespace as a breaking change from prior versions, removing outdated features like JAX-RPC support and EJB 2.x entity beans to streamline development. This version, aligned with Jakarta EE 11, marks optional the EJB 2.x API group to reduce container overhead while maintaining backward compatibility for core functionalities. Jakarta Contexts and Dependency Injection (CDI) 4.1 offers a standardized approach to managed beans and portable extensions, promoting loose coupling by injecting dependencies declaratively rather than through manual instantiation or service locators. It maximizes reusability, testability, and maintainability by defining contexts for bean lifecycles, events for communication, and interceptors for aspect-oriented programming, allowing extensions to customize the container's behavior without vendor lock-in. Key enhancements in this version include a split into CDI Lite for resource-constrained environments and full CDI, defaulting bean discovery to "annotated" mode for empty beans.xml files, and support for build-time compilation via the jakarta.enterprise.lang-model API, requiring Java SE 17 or higher. As part of Jakarta EE 11, CDI 4.1 integrates with the Java Platform Module System through module-info.class files in its API artifacts. Jakarta Persistence (JPA) 3.2 establishes an object-relational mapping (ORM) standard for entity management, query execution via JPQL, and caching strategies to bridge Java objects with relational databases. It provides the EntityManager API for CRUD operations, lifecycle callbacks, and query optimization, with JPQL supporting SQL-like queries including new functions like CEILING, EXP, LOCAL DATE, and EXTRACT for temporal and mathematical operations, alongside Criteria API extensions for type-safe query construction. Caching is handled through first- and second-level caches to improve performance, with entities mappable to tables via annotations like @Entity and @Id. This version, aligned with Jakarta EE 11, mandates Java SE 17 or higher, adds UUID support in GenerationType.UUID, and makes EntityManager and EntityManagerFactory implement AutoCloseable for better resource management. Jakarta Transactions (JTA) 2.0.1 standardizes distributed transaction management, enabling the demarcation of transaction boundaries and coordination among XA-compliant resource managers for atomicity across multiple data sources. It defines Java interfaces like UserTransaction for programmatic control and TransactionManager for container-managed transactions, supporting the two-phase commit protocol inherent in XA resources to ensure consistency in enterprise scenarios involving databases and message queues. The specification facilitates integration with other Jakarta EE components, such as EJBs and JPA, by propagating transaction contexts transparently. Aligned with Jakarta EE 11, it requires Java SE 17 or higher and adopts the jakarta.* namespace without introducing deprecations or incompatibilities. Jakarta Validation (Bean Validation) 3.1 provides a declarative model for applying constraints to JavaBeans and methods, ensuring data integrity through annotations like @NotNull, @Size, and @Email on fields, properties, or parameters. It includes a validation API for programmatic checks via Validator instances, supporting constraint validators for custom logic and integration with other specifications like JPA for entity validation or CDI for injection points. The metadata model allows constraints to propagate in inheritance hierarchies and container elements, with built-in constraints covering common validation needs. Aligned with Jakarta EE 11, this version supports Java SE 17 or higher and shifts to the jakarta.* namespace, maintaining full backward compatibility without removals.

Additional Specifications

Jakarta Batch 2.1 provides a standardized programming model for developing and executing batch applications, enabling the processing of large volumes of data through jobs composed of steps, chunks, and reusable artifacts. It includes a Java API for implementing batch logic, such as item readers, processors, and writers, along with an XML-based Job Specification Language (JSL) for defining job structures, parameters, and flows. This specification supports job scheduling via integration with Jakarta EE containers, allowing for restartability, checkpointing, and partitioning to handle scalable data operations efficiently. Jakarta Messaging 3.1, formerly known as the Java Message Service (JMS) API, standardizes asynchronous communication in enterprise applications by facilitating message exchange between producers and consumers through queues for point-to-point messaging and topics for publish-subscribe patterns. It defines interfaces for connections, sessions, destinations, and message delivery, ensuring reliable, transactional, and ordered message handling across loosely coupled components. Enhancements in this version include repeatable annotations for configuration and support for Jakarta EE 11's namespace changes, promoting integration with other specifications like Jakarta Enterprise Beans for enterprise messaging scenarios. Jakarta Security 4.0 establishes a flexible framework for securing Jakarta EE applications, emphasizing programmatic and declarative approaches to authentication and authorization in modern, container-agnostic environments. It introduces identity stores for credential validation, authorization policies for access control based on roles and permissions, and propagation policies to maintain security context across distributed calls. This version aligns with Jakarta EE 11 by adding support for OpenID Connect integration and deprecating legacy features like the SecurityManager, enabling secure development for cloud-native and microservices architectures. Jakarta Data 1.0, introduced as a new specification in Jakarta EE 11, offers a repository-based abstraction for unified data access across relational and NoSQL databases, allowing developers to define type-safe repository interfaces without boilerplate code. It supports multi-repository patterns with features like method-name queries, pagination, and integration with Jakarta Persistence, NoSQL, and Transactions for consistent data operations. By separating persistence logic from domain models, it simplifies hybrid data environments while maintaining compatibility with Java SE 17 and higher. Jakarta MVC 3.0 delivers a lightweight, action-oriented Model-View-Controller framework built atop Jakarta RESTful Web Services, serving as an alternative to component-based approaches like Jakarta Server Faces for developing RESTful web applications. It routes HTTP requests to controller methods that manipulate models and select views, with built-in support for binding, validation, and templating engines such as Thymeleaf or Freemarker. This specification, aligned with Jakarta EE 11, focuses on simplicity for rapid prototyping and micro-web apps through namespace updates and CDI integration.

Profiles

Web Profile

The Jakarta EE Web Profile is a lightweight subset of the Jakarta EE Platform designed specifically for developing web-centric applications, providing a focused set of specifications that enable efficient, portable web development without the overhead of full enterprise features. It emphasizes modularity and simplicity, allowing developers to build applications that deploy as web archive (WAR) files while supporting essential web technologies. The Web Profile's composition includes key specifications such as Jakarta Servlets for handling HTTP requests, Jakarta Server Pages (JSP) for dynamic content generation, Jakarta Server Faces (JSF) for user interface components, Jakarta RESTful Web Services (JAX-RS) for building RESTful APIs, Jakarta JSON Processing (JSON-P) and JSON Binding (JSON-B) for JSON handling, Contexts and Dependency Injection (CDI) for managing dependencies, Bean Validation for data validation, Jakarta Persistence (JPA) for data access, Jakarta Data for repository abstractions, and Interceptors for cross-cutting concerns. These components form a cohesive stack tailored for web layers, excluding heavier enterprise elements like full Enterprise JavaBeans (EJB) or advanced transaction management beyond basic needs. Targeted at modern web applications and microservices, the Web Profile supports scenarios where applications need to respond quickly to requests without requiring comprehensive backend services, making it suitable for distributed architectures. It omits resource-intensive features to focus on web-oriented development, enabling seamless integration into lightweight environments. Key benefits include a smaller runtime footprint and faster startup times compared to the full platform, which reduces resource consumption and improves scalability in containerized deployments such as those on Kubernetes. Certified in Jakarta EE 11, it provides full support for Java SE 21, leveraging modern language features like records and virtual threads for enhanced performance. This makes it ideal for cloud-native applications where rapid iteration and low latency are critical. Certification for Web Profile compatibility requires implementations to pass the Technology Compatibility Kit (TCK) tests for all included specifications, ensuring portability across vendors and adherence to the standard. Successful certification allows vendors to use the official Jakarta EE Compatible logo, promoting interoperability in web application ecosystems.

Full Platform

The Jakarta EE Full Platform represents the comprehensive edition of the specification suite, designed to support the development and deployment of robust, large-scale enterprise applications. It encompasses the entire set of APIs and technologies required for building complex systems that demand advanced capabilities beyond basic web applications. Unlike lighter profiles, the Full Platform integrates all components necessary for handling distributed transactions, asynchronous messaging, batch processing, and secure enterprise integration, making it suitable for environments where scalability and reliability are paramount. In terms of composition, the Full Platform includes all specifications from the Web Profile—such as Jakarta Servlet, Jakarta Server Pages, Jakarta RESTful Web Services, and Jakarta Contexts and Dependency Injection—augmented by additional enterprise-focused technologies. Key additions include Jakarta Enterprise Beans (EJB) for managing business logic in distributed environments, Jakarta Transactions (JTA) for coordinating atomic operations across resources, Jakarta Messaging (JMS) for reliable asynchronous communication, Jakarta XML Web Services (JAX-WS) for SOAP-based interoperability, Jakarta Batch for processing large-scale data jobs, and enhanced security features via Jakarta Security and Jakarta Authentication. This full assembly ensures a complete runtime environment for monolithic or microservices-based architectures that require end-to-end enterprise functionality. The platform's specifications are detailed in the official Jakarta EE 11 documentation, which lists over 30 integrated components, including Jakarta Persistence for object-relational mapping and Jakarta Connectors for resource adapters. Targeted at monolithic or distributed enterprise applications, the Full Platform addresses use cases involving high-volume transactions, such as financial systems, e-commerce backends, and supply chain management, where components like JMS enable decoupled messaging patterns and JTA ensures data integrity across multiple databases. It supports the orchestration of complex workflows, including batch-oriented tasks for ETL (extract, transform, load) processes via Jakarta Batch, and secure access controls for sensitive operations. Developers leverage this platform when applications must scale horizontally while maintaining ACID (atomicity, consistency, isolation, durability) compliance, contrasting with the Web Profile's focus on simpler web-tier deployments. The evolution of the Full Platform in Jakarta EE 11 emphasizes alignment with contemporary Java features, introducing support for Java records for immutable data structures, virtual threads from Java 21 for efficient concurrency without traditional thread overhead, and the new Jakarta Data 1.0 specification for streamlined repository abstractions. These updates require a minimum Java SE 17 runtime, increasing footprint compared to prior versions but enabling better performance in cloud-native and reactive scenarios. While the core enterprise specs like EJB and JTA receive minor enhancements for compatibility, the platform removes deprecated elements such as ManagedBeans to streamline development. Certification for Full Platform implementations mandates rigorous compliance with Technology Compatibility Kits (TCKs) for every included specification, ensuring portability and interoperability across vendors. Compatible products, such as those earning the Jakarta EE Compatible logo, must pass these TCKs on Java SE 17 or 21, with tests modernized using tools like Maven and Arquillian for automated validation. Backward compatibility is maintained for most APIs to facilitate migrations from earlier versions, though removals like the SecurityManager requirement may necessitate code adjustments in legacy applications. This process upholds the platform's stability for enterprise adoption, as outlined in the Eclipse Foundation's compatibility guidelines.

Implementations

Certified Runtimes

Certified runtimes for Jakarta EE are application servers and platforms that have undergone the official certification process to ensure full compatibility with the platform's specifications. This process requires vendors to execute the Technology Compatibility Kit (TCK), a comprehensive suite of tests verifying adherence to Jakarta EE APIs and behaviors, and to publish detailed results publicly. Upon approval by the Eclipse Foundation's Jakarta EE Working Group, certified products are listed on the official compatibility page at jakarta.ee, covering versions from Jakarta EE 8 through 11, with separate categories for Full Platform, Web Profile, and Core Profile support where applicable. Eclipse GlassFish serves as the reference implementation for Jakarta EE, providing an open-source, modular runtime that developers can use to validate applications against the platform standards. Certified for both the Full Platform and Web Profile in Jakarta EE 11 (versions 8.0.0-M12 and 8.0.0-M10, respectively, supporting Java 17 and 21), it features lightweight distributions allowing selective inclusion of components for optimized deployments. Its role as the TCK ratifying implementation ensures it embodies the exact behaviors defined in the specifications. WildFly, the community-driven evolution of the former JBoss application server, offers a full-stack, modular runtime emphasizing high performance and scalability for enterprise applications. It is compatible with Jakarta EE 11, with certification for the Core Profile (version 34.0.0.Final, supporting Java 17 and 21), including advanced features like clustering for distributed environments and integrated management tools such as a web console, CLI, and REST API. These capabilities make it suitable for large-scale deployments requiring fault tolerance and centralized configuration. Payara Server, an enterprise-grade fork of GlassFish, integrates seamlessly with Jakarta EE while adding DevOps-oriented enhancements for modern infrastructures. Certified for both the Full Platform and Web Profile in Jakarta EE 11 (version 7.2025.1 as of November 2025), it supports Eclipse MicroProfile for microservices and provides native Kubernetes integration through tools like Payara Qube, enabling automated scaling and zero-downtime deployments in cloud-native settings. This focus on containerization and observability positions it as a bridge between traditional enterprise Java and cloud operations. Open Liberty delivers a lightweight, fast-starting runtime optimized for cloud and microservices architectures, using a feature-pack model where only necessary components are enabled to minimize footprint. Certified for the Jakarta EE 11 Web Profile and Core Profile (version 24.0.0.11-beta, supporting Java 17 and 21), it excels in containerized environments with zero-migration support across clouds and rapid provisioning for development workflows. Its modular design facilitates seamless upgrades and integration with Kubernetes, making it ideal for agile teams building scalable web applications. Other certified runtimes include Fujitsu Software Enterprise Application Platform 2.0.0 for the Core Profile.

Development and Deployment Tools

Development and deployment of Jakarta EE applications are facilitated by a range of integrated tools that support integrated development environments (IDEs), build automation, testing frameworks, containerization, orchestration, and migration utilities. These tools streamline workflows from code authoring to production deployment, ensuring compatibility with the Jakarta EE platform's specifications and certified runtimes such as GlassFish. Integrated development environments provide robust support for Jakarta EE through dedicated plugins and packages. The Eclipse IDE for Enterprise Java Developers includes built-in support for Jakarta EE, featuring tools for editing annotations, generating code, and integrating with Technology Compatibility Kits (TCKs) via the Eclipse Jakarta Tools project. IntelliJ IDEA offers the Jakarta EE Platform plugin, which enables project templates, artifact management, and TCK validation, along with specialized plugins for components like Jakarta Server Faces (JSF) and Enterprise JavaBeans (EJB). Build tools simplify dependency management and project scaffolding for Jakarta EE applications. Maven utilizes the official Jakarta EE Bill of Materials (BOM) to align versions of jakarta.* dependencies across specifications, while archetypes generate starter projects with pre-configured structures for web applications and enterprise archives. Gradle supports Jakarta EE through plugins like the Jakarta EE Migration Plugin for namespace updates and dependency substitutions, enabling BOM-like management via platform declarations in build scripts. Testing frameworks enhance verification of Jakarta EE components at various levels. Arquillian provides container-agnostic integration testing by embedding tests within real runtimes, supporting Jakarta EE 10 and later for functional validation of EJBs, REST endpoints, and CDI beans. REST Assured facilitates API testing with a domain-specific language for HTTP assertions, compatible with Jakarta EE via upgrades that migrate from javax to jakarta namespaces. Deployment tools focus on containerization and orchestration for scalable Jakarta EE applications. Official Docker images are available for certified runtimes like Payara Server and WildFly, allowing multi-stage builds that package applications efficiently for cloud-native environments. Helm charts enable Kubernetes deployment of Jakarta EE servers, such as those for Open Liberty, by defining configurable manifests for pods, services, and scaling. Jenkins supports CI/CD pipelines tailored for Jakarta EE, automating builds, tests, and deployments to runtimes via plugins for Maven, Docker, and Kubernetes integration. Migration tools assist in transitioning legacy Java EE codebases to Jakarta EE. OpenRewrite offers recipes that automate the update of javax.* imports to jakarta.*, handle deprecated methods, and adjust dependencies for versions 9 through 11.

Practical Usage

Application Architecture

Jakarta EE applications typically follow a multitier or layered architecture to promote separation of concerns, scalability, and maintainability. This structure divides the application into distinct layers: presentation, business, persistence, and integration. The presentation layer handles user interactions using technologies such as Jakarta Servlets for HTTP request processing and Jakarta Server Faces (JSF) for building component-based user interfaces. The business layer encapsulates core logic through Contexts and Dependency Injection (CDI) for managing beans and loose coupling, or Enterprise JavaBeans (EJB) for transactional and secure operations. The persistence layer manages data access via Jakarta Persistence (JPA) for object-relational mapping, often complemented by Java Database Connectivity (JDBC). The integration layer facilitates communication with external systems using Jakarta Messaging (JMS) for asynchronous messaging or Jakarta RESTful Web Services (JAX-RS) for API-based interactions. In a microservices approach, Jakarta EE leverages the Web Profile to develop lightweight, independent services that can be deployed separately, with CDI serving as the primary mechanism for dependency wiring and inversion of control. This enables modular decomposition of larger applications into focused services, often integrated with MicroProfile specifications for cloud-native features like configuration and health checks. Best practices emphasize annotation-driven configuration to simplify development and reduce boilerplate, allowing declarative specification of dependencies, transactions, and lifecycles directly in code. Security is integrated via Jakarta Security, which provides portable mechanisms for authentication and authorization using annotations like @RolesAllowed. Monitoring and observability can be enhanced through MicroProfile extensions, such as Metrics and Health, to track application performance in distributed environments. Deployment patterns in Jakarta EE support evolution from monolithic structures to microservices by extracting bounded contexts into separate deployables, often using the Strangler Fig pattern to incrementally replace legacy components. Containerization with tools like Docker and orchestration via Kubernetes enables horizontal scalability and portability across cloud environments. A common pitfall is over-reliance on XML-based deployment descriptors, which can lead to verbosity and maintenance challenges; instead, annotations should be prioritized for modern, declarative configurations.

Code Examples

Jakarta EE provides a rich set of APIs for building enterprise applications, and code examples illustrate how these APIs integrate to handle common tasks such as web request processing, dependency injection, data persistence, transaction management, and data serialization. The following annotated examples draw from the official Jakarta EE Tutorial and specifications, demonstrating core concepts in a modular fashion. These snippets assume a compatible runtime like a certified Jakarta EE 11 server and focus on key annotations and methods without full application setup.

Simple Servlet Example Using Jakarta Servlet 6.1 Annotations

Jakarta Servlet 6.1, part of Jakarta EE 11, simplifies web application development by allowing declarative configuration via annotations, eliminating the need for deployment descriptors in many cases. The @WebServlet annotation maps a servlet class to a URL pattern, handling HTTP requests such as GET. This example shows a basic servlet that responds to GET requests at the "/hello" path, generating a simple HTML response. The doGet method processes the request, sets the content type, and writes output using the response writer.

java

import jakarta.servlet.ServletException; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; @WebServlet(name = "HelloServlet", urlPatterns = {"/hello"}) public class HelloServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); response.setBufferSize(8192); // Optional: Set buffer for efficiency PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head><title>Hello World</title></head>"); out.println("<body><h1>Hello from Jakarta Servlet!</h1></body>"); out.println("</html>"); out.close(); } }

import jakarta.servlet.ServletException; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; @WebServlet(name = "HelloServlet", urlPatterns = {"/hello"}) public class HelloServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); response.setBufferSize(8192); // Optional: Set buffer for efficiency PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head><title>Hello World</title></head>"); out.println("<body><h1>Hello from Jakarta Servlet!</h1></body>"); out.println("</html>"); out.close(); } }

This servlet is automatically discovered and deployed in a Jakarta EE container supporting Servlet 6.1. When accessed via HTTP GET to "/hello", it produces a static HTML page, showcasing lifecycle management where the container instantiates and initializes the servlet on first use. For error handling or POST requests, additional overrides like doPost can be added similarly.

CDI Bean Injection in a REST Endpoint with JAX-RS 4.0

Contexts and Dependency Injection (CDI) in Jakarta EE enables loose coupling by injecting dependencies into managed beans, including JAX-RS resources. JAX-RS 4.0 defines RESTful web services, where @Path annotations map endpoints, and @Inject from CDI (Jakarta CDI 4.1) resolves service beans at runtime. This example demonstrates a REST endpoint injecting a CDI-managed service to fetch data, returning a JSON response. The container scans for @RequestScoped or @ApplicationScoped beans to satisfy the injection. Assume a simple CDI service bean:

java

import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped public class DataService { public String getData() { return "Data from CDI service"; } }

import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped public class DataService { public String getData() { return "Data from CDI service"; } }

Now, the JAX-RS resource class:

java

import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Inject; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; @Path("/api/data") @RequestScoped public class DataResource { @Inject private DataService dataService; @GET @Produces(MediaType.APPLICATION_JSON) public Response getData() { String data = dataService.getData(); return Response.ok(data).build(); } }

import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Inject; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; @Path("/api/data") @RequestScoped public class DataResource { @Inject private DataService dataService; @GET @Produces(MediaType.APPLICATION_JSON) public Response getData() { String data = dataService.getData(); return Response.ok(data).build(); } }

Deployed in a Jakarta EE application, a GET request to "/api/data" triggers CDI to inject the DataService instance, which is managed by the container's bean manager. This promotes testability, as the service can be mocked or replaced without altering the resource class. JAX-RS 4.0 enhancements include better support for reactive streams, but this example focuses on synchronous injection.

JPA Entity with Relationships and a Basic Repository Query Using JPQL

Jakarta Persistence (JPA) 3.2 models relational data as entities with annotations for mappings, including relationships like one-to-many. Entities use @Entity and relationship annotations such as @OneToMany to define associations, enabling object-oriented data access. JPQL (Jakarta Persistence Query Language) provides a SQL-like syntax for querying entities, abstracting database specifics. This example shows a CustomerOrder entity with a bidirectional one-to-many relationship to LineItem, followed by a JPQL query to retrieve orders. First, the LineItem entity:

java

import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.ManyToOne; import jakarta.persistence.GeneratedValue; @Entity public class LineItem { @Id @GeneratedValue private Long id; private String itemName; private int quantity; @ManyToOne private CustomerOrder customerOrder; // Owning side of relationship // Constructors, getters, setters public LineItem() {} // ... (omitted for brevity) }

import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.ManyToOne; import jakarta.persistence.GeneratedValue; @Entity public class LineItem { @Id @GeneratedValue private Long id; private String itemName; private int quantity; @ManyToOne private CustomerOrder customerOrder; // Owning side of relationship // Constructors, getters, setters public LineItem() {} // ... (omitted for brevity) }

The CustomerOrder entity with relationship:

java

import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.GeneratedValue; import jakarta.persistence.OneToMany; import jakarta.persistence.CascadeType; import java.util.List; @Entity public class CustomerOrder { @Id @GeneratedValue private Long id; private Long orderId; private String customerName; @OneToMany(mappedBy = "customerOrder", cascade = CascadeType.ALL) private List<LineItem> lineItems; // Inverse side // Constructors, getters, setters public CustomerOrder() {} // ... (omitted for brevity) }

import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.GeneratedValue; import jakarta.persistence.OneToMany; import jakarta.persistence.CascadeType; import java.util.List; @Entity public class CustomerOrder { @Id @GeneratedValue private Long id; private Long orderId; private String customerName; @OneToMany(mappedBy = "customerOrder", cascade = CascadeType.ALL) private List<LineItem> lineItems; // Inverse side // Constructors, getters, setters public CustomerOrder() {} // ... (omitted for brevity) }

In a repository or session bean, use JPQL for querying:

java

import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; import jakarta.persistence.Query; import java.util.List; public class OrderRepository { @PersistenceContext private EntityManager em; public List<CustomerOrder> findAllOrders() { Query query = em.createQuery("SELECT co FROM CustomerOrder co ORDER BY co.orderId"); return query.getResultList(); } }

import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; import jakarta.persistence.Query; import java.util.List; public class OrderRepository { @PersistenceContext private EntityManager em; public List<CustomerOrder> findAllOrders() { Query query = em.createQuery("SELECT co FROM CustomerOrder co ORDER BY co.orderId"); return query.getResultList(); } }

The @OneToMany annotation ensures cascading operations (e.g., persisting an order saves its line items), while the JPQL query fetches all orders sorted by ID, leveraging entity relationships for joins. This is executed within a transaction via an EntityManager injected by the container, supporting databases like PostgreSQL or MySQL through JPA providers such as Hibernate.

Transactional EJB Method Example with @TransactionAttribute

Enterprise JavaBeans (EJB) 4.0 provide declarative transaction management via the @TransactionAttribute annotation, specifying how methods interact with transactions (e.g., REQUIRED joins or starts a transaction). This is crucial for ensuring data consistency in business logic. The example below shows a stateful session bean with method-level attributes overriding the class default, demonstrating suspension and resumption of transactions.

java

import jakarta.ejb.Stateful; import jakarta.ejb.TransactionAttribute; import jakarta.ejb.TransactionAttributeType; import jakarta.ejb.TransactionManagement; import jakarta.ejb.TransactionManagementType; @Stateful @TransactionManagement(TransactionManagementType.CONTAINER) @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) // Default: No transaction for bean methods public class TransactionBean { @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) // Suspends any existing tx, starts new public void firstMethod() { // Business logic that requires isolation in a new transaction System.out.println("Executing in new transaction"); } @TransactionAttribute(TransactionAttributeType.REQUIRED) // Joins existing or starts new public void secondMethod() { // Business logic that must run transactionally System.out.println("Executing in required transaction"); } // thirdMethod and fourthMethod inherit NOT_SUPPORTED, run without tx public void thirdMethod() { // Non-transactional operation } }

import jakarta.ejb.Stateful; import jakarta.ejb.TransactionAttribute; import jakarta.ejb.TransactionAttributeType; import jakarta.ejb.TransactionManagement; import jakarta.ejb.TransactionManagementType; @Stateful @TransactionManagement(TransactionManagementType.CONTAINER) @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) // Default: No transaction for bean methods public class TransactionBean { @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) // Suspends any existing tx, starts new public void firstMethod() { // Business logic that requires isolation in a new transaction System.out.println("Executing in new transaction"); } @TransactionAttribute(TransactionAttributeType.REQUIRED) // Joins existing or starts new public void secondMethod() { // Business logic that must run transactionally System.out.println("Executing in required transaction"); } // thirdMethod and fourthMethod inherit NOT_SUPPORTED, run without tx public void thirdMethod() { // Non-transactional operation } }

The container-managed transactions (CMT) handle demarcation: firstMethod always uses a new transaction, ideal for logging or auditing independent of the caller. secondMethod participates in the caller's transaction if present, rolling back on failure. This setup is used in Jakarta EE applications for robust, distributed transaction support via Jakarta Transactions.

JSON-B Serialization for API Responses

Jakarta JSON Binding (JSON-B) 3.0 offers a standard API for mapping Java objects to JSON, useful for REST API responses in JAX-RS. Annotations like @JsonbProperty customize serialization, while Jsonb instances handle conversion. This example defines a Person class and serializes it to JSON, renaming the field for API compatibility. JSON-B ensures UTF-8 encoding and RFC 7159 compliance. Class definition:

java

import jakarta.json.bind.annotation.JsonbProperty; public class Person { @JsonbProperty("person-name") // Customizes JSON field name private String name; // Constructors, getters, setters public Person() {} public Person(String name) { this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } }

import jakarta.json.bind.annotation.JsonbProperty; public class Person { @JsonbProperty("person-name") // Customizes JSON field name private String name; // Constructors, getters, setters public Person() {} public Person(String name) { this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } }

Serialization in a JAX-RS endpoint or utility:

java

import jakarta.json.bind.Jsonb; import jakarta.json.bind.JsonbBuilder; import jakarta.json.bind.JsonbConfig; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.Produces; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.core.MediaType; @Path("/api/person") public class PersonResource { @GET @Produces(MediaType.APPLICATION_JSON) public Response getPerson() { Person person = new Person("Fred"); JsonbConfig config = new JsonbConfig().withFormatting(true); // Optional: Pretty-print JSON Jsonb jsonb = JsonbBuilder.create(config); String json = jsonb.toJson(person); // Serializes to {"person-name": "Fred"} return Response.ok(json).build(); } }

import jakarta.json.bind.Jsonb; import jakarta.json.bind.JsonbBuilder; import jakarta.json.bind.JsonbConfig; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.Produces; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.core.MediaType; @Path("/api/person") public class PersonResource { @GET @Produces(MediaType.APPLICATION_JSON) public Response getPerson() { Person person = new Person("Fred"); JsonbConfig config = new JsonbConfig().withFormatting(true); // Optional: Pretty-print JSON Jsonb jsonb = JsonbBuilder.create(config); String json = jsonb.toJson(person); // Serializes to {"person-name": "Fred"} return Response.ok(json).build(); } }

The toJson method produces compact or formatted JSON based on the config, integrating seamlessly with JAX-RS for automatic response handling when returning objects directly. For deserialization, fromJson reverses the process. Implementations like Eclipse Yasson provide the runtime, supporting adapters for complex types like dates.

References

Add your contribution
Related Hubs
Contribute something
User Avatar
No comments yet.