Skip to content
javahacks.dev
Jakarta EE

Jakarta EE 10 New Features Explained and What Changed

What Jakarta EE 10 introduced: the Core Profile, CDI Lite, removals of old features, Java 11 as a baseline and updated specifications for web and REST.

5 min read
Summarize in AI
Flat illustration of an editor window full of code, with the Spring, OpenJDK, Gradle and Apache Maven logos.

Jakarta EE 9 renamed the packages and changed nothing else. Jakarta EE 10 was the first release since the move to add features, and many applications still run on its servers. This post lists what changed and what it meant for application code. If you are moving on to the next release, Jakarta EE 11 builds on these changes. The platform overview is in what Jakarta EE is.

The Core Profile

The Core Profile is a new, small profile with only the specifications needed to build lightweight services: CDI Lite, Jakarta REST, JSON-B, JSON-P, Interceptors, Annotations and Dependency Injection. It targets runtimes that do their work at build time, such as Quarkus and Helidon. The grouping is explained in Jakarta EE profiles.

CDI 4.0: Lite and Full

CDI 4.0 split into CDI Lite, a subset that a build-time container can implement without runtime reflection, and CDI Full, which keeps the whole model. The Lite container supports "build compatible extensions", a way to extend CDI that runs at build time. This is why Quarkus' ArC can claim CDI compatibility while resolving beans at build time.

Java baseline

Jakarta EE 10 requires Java 11 and supports Java 17. Servers certified for EE 10 run on Java 17 and, in newer releases, Java 21.

Specification updates

SpecificationVersionWhat changed
Servlet6.0Removed deprecated APIs, support for HTTP/3 groundwork, new cookie and attributes methods
Faces4.0Removed managed beans and other deprecated items, new jakarta.faces namespaces for tag libraries
Persistence3.1UUID as a basic type, new JPQL functions
REST3.1Multipart support in the API, @Context handling, cleanup
Validation3.0Namespace and cleanup only
Security3.0New OpenID Connect support in authentication

Details vary per specification, so check the page for the version you use. The change that most often affects code is in Faces: tag library namespaces moved to jakarta.faces.html and jakarta.faces.core, described in JSF and PrimeFaces for maintainers.

The Faces tag library change is the first thing a migrated page shows:

XML
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="jakarta.faces.html"
      xmlns:f="jakarta.faces.core">

Removals

A lot of deprecated functionality was removed. The significant ones for application authors:

  • Faces managed beans (@ManagedBean and the scope annotations in jakarta.faces.bean).
  • A number of deprecated Servlet methods.
  • javax.annotation.security classes moved and cleaned up.
  • Deprecated EJB features in the Full Platform.

Code that compiled against EE 9 with deprecation warnings is the code most likely to fail.

What to do when moving from EE 9 or 8

  1. Move to the jakarta namespace if you have not (migrating with OpenRewrite).
  2. Replace removed APIs, starting with Faces managed beans.
  3. Update tag library namespaces in Facelets pages.
  4. Run on Java 17.
  5. Test the application on an EE 10 server such as WildFly 27 or later, Payara 6 or Open Liberty with the EE 10 feature set.

Versions of the specifications in the release

A library that states a Jakarta version needs a place to look it up. These are the main specifications and the versions in Jakarta EE 10:

SpecificationVersion in EE 10
Servlet6.0
Faces4.0
Persistence3.1
CDI4.0
RESTful Web Services3.1
Bean Validation3.0
Security3.0
WebSocket2.1
JSON Binding3.0
Concurrency3.0
Enterprise Beans4.0

When a dependency declares jakarta.servlet-api:6.0.0, it targets this release. A server that supports Servlet 5.0 runs Jakarta EE 9, and an application built for 6.0 does not run on it.

What a Core Profile application looks like

The Core Profile gave a small target for services that need REST and injection and nothing else. An application is a JAX-RS class with CDI Lite beans:

java
@ApplicationPath("/api")
public class ShopApplication extends Application { }

@Path("/orders")
@ApplicationScoped
public class OrderResource {

    @Inject
    OrderService service;

    @GET
    @Path("/{id}")
    @Produces(MediaType.APPLICATION_JSON)
    public Order find(@PathParam("id") long id) {
        return service.find(id);
    }
}

The same code runs on the Web and Full profiles, so it is portable upward. CDI Lite uses build-time extensions in place of the runtime portable extensions of full CDI, which is what lets runtimes such as Quarkus do their work at build time. A library that depends on a portable extension does not run on the Core Profile.

Persistence additions

Persistence 3.1 added UUID as a basic type that can be mapped without a converter, and a set of query functions in JPQL. The UUID support removes a common piece of boilerplate:

java
@Entity
public class Customer {

    @Id
    @GeneratedValue(strategy = GenerationType.UUID)
    private UUID id;

    private String name;
}

GenerationType.UUID asks the provider to generate the value, and the column type depends on the database, a native uuid type on PostgreSQL and binary or character storage elsewhere. Check the column that your provider creates before using it for a large table, since a 36 character string column makes indexes bigger than a 16 byte binary one.

Removals that break compilation

Version 10 removed APIs that had been deprecated for years. The compiler tells you at once, and the fixes are mechanical:

RemovedReplacement
SingleThreadModel in ServletMake the servlet thread-safe, or synchronise
Managed beans in Faces (@ManagedBean and scopes)CDI beans with @Named and the CDI scopes
Several deprecated Servlet methods and classesThe replacements named in the Javadoc
Deprecated Security classes from the Java EE eraThe Jakarta Security API

Take the list from the compile errors and the release notes for each specification you use. Guessing from this table is not enough, since an application's mix is its own.

A migration test that pays for itself

Deploy the application to a Jakarta EE 10 server in a test environment and run the requests that use each specification: a servlet, a persistence query, a validated REST call, a Faces page if any. A build that compiles and a server that starts leave many failures untouched, and a short smoke suite that runs the same requests as before the move finds the rest. Keep it in the repository so that the next platform upgrade has the same starting point.

Planning the move from 10 to 11

An application on Jakarta EE 10 has a smaller step to 11 than the one from 8 to 9. The Java baseline rises to 17, and some deprecated features are removed, so start by compiling against the new APIs and reading the warnings. Check your server's support for 11 before anything else, since the platform follows the server vendors. Plan the upgrade as a routine change of dependencies and a test run, with no rename and no new framework.

Keep the upgrade branch short-lived, and merge it when the tests pass on the new server in staging.

Where this does not apply

Spring Boot 3 users meet most of these specifications through Spring and see them as library versions. The Jakarta EE 10 release page lists every specification and links its notes, and the platform specification gives the exact requirements.

Share

Keep reading

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.