Jakarta EE 11 : What’s new?

Ajay Paul
7 min readMay 7, 2024

--

image of sun rise portraying “New”

Jakarta EE 11, the latest version of the cloud-native enterprise Java platform specification, is here and it’s packed with exciting new features. The overall theme for Jakarta EE 11 is Performance and Developer Productivity. Let’s dive into some of the key features of this release.

CDI Alignment

Jakarta EE 11 brings better alignment with Contexts and Dependency Injection (CDI). It added the ability for Asynchronous to run on a Schedule. With this release, Jakarta EE continues to become more CDI-centric and streamlined.

CDI is a powerful and flexible framework that allows developers to manage the lifecycle of their objects and the interactions between them. By aligning Jakarta EE more closely with CDI, the platform becomes more consistent and easier to use. Developers can now use the same annotations and concepts across different parts of the platform, reducing the learning curve and increasing productivity.

Java SE Alignment

Jakarta EE 11 introduces support for Java SE 17and 21, which means developers can now leverage the latest language features and APIs from Java SE in their enterprise applications.

Support for New Language Features

Some specifications in Jakarta EE 11 have been updated to support language features introduced between Java 11 and Java 21. This includes support for Virtual Threads and Records, which are among the most anticipated features in recent Java releases.

Virtual Threads, also known as lightweight threads are a new kind of thread that can be scheduled by the Java runtime rather than the operating system. This can lead to significant performance improvements for IO-bound applications. Records, on the other hand, are a new kind of class that can be used to model simple data aggregates with a small amount of code.

Specification Updates

For the specifications below, there have been minor updates as part of Jakarta 11.

  • Jakarta Annotations 3.0
  • Jakarta Authentication 3.1
  • Jakarta Authorization 3.0
  • Jakarta Validation 3.1
  • Jakarta Concurrency 3.1
  • Jakarta Contexts and Dependency Injection 4.1
  • Jakarta Expression Language 6.0
  • Jakarta Faces 5.0
  • Jakarta Interceptors 2.2
  • Jakarta Pages 4.0
  • Jakarta Persistence 3.2
  • Jakarta RESTful Web Services 4.0
  • Jakarta Security 4.0
  • Jakarta Servlet 6.1
  • Jakarta WebSocket 2.2

Jakarta Data is likely going to be in Jakarta EE 11. Jakarta MVC and Jakarta NoSQL will stay on their own, not part of the main Platform.

Here’s a simple picture below to show what Jakarta EE 11 might look like if this happens.

Jakarta EE 11 new features and updates overall diagram

Jakarta Annotations 3.0

Jakarta Annotations gives a set of annotations for easier and clearer coding across different Java technologies.

This update’s main goal is to remove the old @ManagedBean annotation completely.

Jakarta Authentication 3.1

Jakarta Authentication 3.1 has small updates to fit better with Jakarta Security’s aims. These updates focus on making things clearer about user states and handling multiple users. Also, it removes all mentions of SecurityManager.

Jakarta Authorization 3.0

Jakarta Authorization 3.0 aims to update and make the specification ready for cloud setups. To do this, it plans to:

  • Add a way to add policy providers through code.
  • Create a new version to replace java.security.Policy.
  • Get rid of all mentions of SecurityManager.

Jakarta Authorization is about setting permissions for users. It decides if a user should have access to something. It also helps adapt security rules for specific systems like Jakarta Servlet or Jakarta Enterprise Beans.

In this update, the focus is on making Jakarta Authorization future-proof by adding new policy methods and removing the security manager. Plus, it will be easier to use in the cloud with code-based policy provider options, similar to what Jakarta Authentication offers.

Jakarta Validation 3.1

Jakarta Validation 3.1 will now work with Java Records. Records are special classes introduced in Java 16 that hold data and can’t be changed.

Jakarta Concurrency 3.1

Jakarta Concurrency helps applications use multiple tasks at once without causing issues to the main system, all while keeping the benefits of Jakarta EE.

The big update in Jakarta Concurrency 3.1 is adding support for Virtual Threads. These are lightweight threads introduced in Java 21.

Additionally, this version of Jakarta Concurrency is moving closer to being centered around CDI, making it easier to use with Contexts and Dependency Injection.

Jakarta Contexts and Dependency Injection 4.1

In the CDI 4.1 Milestone, there are plans to fix some small issues in the Specification, APIs, and TCK. Here’s a summary of what’s being considered:

  • Splitting spec/TCK to eliminate circular dependencies
  • Delegating integration requirements to Jakarta Platform specifications
  • Enhancing method invokers and executable methods
  • Standardizing interceptor binding retrieval
  • Introducing @Priority on producers
  • Reviewing unused imports in CDI 4
  • Seeking clarification on getReference() usage during AfterDeploymentValidation event
  • Providing programmatic access to Assignability rules
  • Adding methods for applying decorators in BeanConfigurator
  • Compiling a list of potential changes for the next CDI version
  • Refining managed bean requirements
  • Addressing inconsistencies in unproxyable bean discovery
  • Clarifying assignability rules for types with multiple bounds

Jakarta Expression Language 6.0

Jakarta Expression Language provides a way to use expressions in Java apps.

What’s New:

  • You don’t need the java.desktop module anymore.
  • Arrays can now use a new property called “length.”
  • Support for java.lang.Record is added with the new RecordELResolver.
  • There’s also support for java.lang.Optional using the new OptionalELResolver, but it’s turned off by default.

Changes and Improvements:

  • Old code from Expression Language 5.0 that was marked as outdated has been taken out.
  • The getFeatureDescriptors() method in the ELResolver interface is gone.
  • All mentions and connections to Java SecurityManager and its related parts have been removed.

Jakarta Faces 5.0

Jakarta Faces 5.0 have removed all the references to Security Manager.

Jakarta Interceptors 2.2

Think of them as intercepting filters or middleware that sit between the caller and the callee, intercepting method calls or events before or after they execute.There is only a minor update in Jakarta Interceptors 2.2 . They have added a standard accessor to interceptor bindings.

Jakarta Pages 4.0

Jakarta Pages is a template engine designed for web applications. It allows you to blend textual content, including HTML and XML, with custom tags, an expression language, and even Java code. The best part? All of this gets compiled into a Jakarta Servlet, making it a powerful tool for web development.

Jakarta Persistence 3.2

There are so many updates in Jakarta Persistence 3.2 which helps developers.

  • Now we can use Java Records as an embeddable type.
  • They have introduced support for sub queries, which means we can do enhanced searches.
  • We can now manage database layouts more easily with programmatic schema management.
  • They have introduced stateless Security Manager.

Additionally lot of functions and operators have been introduced.

This version have stopped supporting the features like java.util.Calendar, java.util.Date, java.SQL.Time, and java.SQL.Timestamp.

Jakarta RESTful Web Services 4.0

Jakarta RESTful web services provides API to develop web services following the Representational State Transfer (REST) architectural pattern.

The aim of this release is to eliminate the need for JAXB dependency and ManagedBean support in Jakarta RESTful Web Services. Additionally, it includes TCK tests to ensure thorough verification, while still keeping compatibility with previous releases.

Jakarta Security 4.0

Jakarta Security helps to create secure Jakarta EE applications.This release they have introduced APIs for authorization which includes interceptor and an abstraction for the permission store.

Jakarta Servlet 6.1

Main purpose of Jakarta Servlet is to handle HTTP requests and responses .

In Jakarta 11 release they have removed references to SecuirtyManager and provided various updates.

  • Now you can manage the status code and response body when redirecting.
  • A query string attribute is now available for error dispatches.
  • New constants for additional HTTP status codes have been added.
  • Methods have been updated to use CharSet instead of just String.
  • ServletInputStream and ServletOutputStream now support ByteBuffer.
  • Various improvements and clarifications have been made.

Jakarta WebSocket 2.2

Jakarta WebSocket also removes references to the SecurityManager and there are only few minor updates in the new release.

Major Changes :

  • Breaking down the spec/TCK to avoid looping dependencies.
  • Handing over integration needs to the Jakarta Platform specs.
  • Adding support for method invokers and executable methods.
  • Standardizing interceptor bindings.
  • Using @Priority for producers.
  • Cleaning up unused imports in CDI 4 classes.
  • Figuring out how to use getReference() during AfterDeploymentValidation without causing issues.
  • Giving programmatic access to Assignability rules.
  • Adding decorator methods to BeanConfigurator.

Possible Future Changes:

  • Suggestions for the next CDI version.
  • Clearing up managed bean requirements related to public fields.
  • Fixing inconsistent behaviour with unproxyable beans.
  • Clarifying type assignability for CDI-440.

Removals and Deprecations:
The Expression Language methods on BeanManager will be marked as deprecated. This is to prepare for a shift to a new subinterface in a different package. It cuts down reliance on Jakarta Expression Language from the core API and moves non-client features to the subinterface.

New Features:

Jakarta EE 11 is planning to include the following feature in the new release

  • Jakarta Data 1.0

Jakarta Data 1.0

Jakarta Data is a new specification for persistence in Java applications. It aims to offer a simplified programming model suitable for use with non-relational databases. Here are some key features:

  • Repository Programming Model: Jakarta Data introduces the concept of a “repository,” providing a programming model that is tied to specific entities. This flexibility enhances data management in applications.
  • Simplified Programming Model: Jakarta Data aims to simplify the programming model for persistence in Java, reducing complexity and boilerplate code for developers.
  • Support for Non-Relational Databases: Jakarta Data is designed to work seamlessly with non-relational databases, acknowledging their increasing popularity in modern application development. This compatibility expands the options available to developers while maintaining Java standards.

Conclusion

Jakarta EE 11 represents a significant step forward for the enterprise Java community. With its focus on performance and developer productivity, it continues to evolve to meet the needs of modern, cloud-native application development. Whether you’re a seasoned enterprise Java developer or just getting started, Jakarta EE 11 has something to offer you.

--

--