What's New in Jakarta EE 10?
Originally published on 14 Sep 2022
Last updated on 14 Sep 2022
Jakarta EE 10 will be released on September 22! It's almost here...
While the previous releases of Jakarta EE have been focussed on the much-feared namespace change and updating everything with support for Java 11, this is the first major release of Jakarta EE to start introducing new features for developers to use. I’ll cover some of them here.
Java 11 & 17
WhileJakarta EE9.1 retained support forJava8 but could also be used with Java 11, Jakarta EE now requires Java 11 as the minimum. Java 17 support is also available
Which Specifications Changed?
This is no minor release! For this release of Jakarta EE there are almost just as many major updates as there are minor (12 minor, 11 major). The following specifications have all been updated:
- Activation 2.1 (minor release)
- Annotations 2.1 (minor release)
- Authentication 3.0 (major release)
- Authorization 2.1 (minor release)
- Batch 2.1 (minor release)
- Concurrency 3.0 (major release)
- Connectors 2.1 (minor release)
- Contexts and Dependency Injection 4.0 (major release)
- Expression Language 5.0 (major release)
- Interceptors 2.1 (minor release)
- JSON Binding 3.0 (major release)
- JSON Processing 2.1 (minor release)
- Mail 2.1 (minor release)
- Messaging 3.1 (minor release)
- Persistence 3.1 (minor release)
- RESTful Web Services 3.1 (minor release)
- Security 3.0 (major release)
- Server Faces 4.0 (major release)
- Server Pages 3.1 (minor release)
- Servlet 6.0 (major release)
- SOAP with Attachments 3.0 (major release)
- Standard Tag Library 3.0 (major release)
- WebSocket 2.1 (minor release)
- XML Binding 4.0 (major release)
- XML Web Services 4.0 (major release)
I’ll run through some of the changes in the major releases:
Authentication
Authentication 3.0now allows a ServerAuthModule
the ability to programmatically interact with other specifications, for example obtaining references to data sources, Jakarta Enterprise Beans, CDI Beans, etc.
A new key, Jakarta.servlet.http.isAuthenticationRequest
, has also been added to allow modules to distinguish themselves at different points in the lifecycle of a request.
Numerous issues have also been resolved or delivered with this release, such as the addition of default methods to ServerAuth
& ClientAuth
, new methods for adding or removing a single server auth module, and the API has been updated with generics.
Concurrency
One of the biggest changes you may notice with the new version of Jakarta Concurrency is that it has moved! It is now included in Web Profile distributions of Jakarta EE.
Along with this move,Concurrency 3.0also brings with it a number of new features:
- Asynchronous methods
- Context-aware completion stages and completable futures
- Context propagation to parallel streams operations
- Modernization of the Trigger mechanism and Cron support
- Propagation of third-party context types
- Resource definition annotations
CDI
CDI has undergone a number of changes for this release of Jakarta EE, arguably the two most prominent of which being the introduction of CDI Lite with its attendant Build Compatible Extensions, and the change in the interpretation of an empty beans.xml
from “all” to “annotated”. The latter change is one you may notice by your existing applications suddenly not working so be sure to account for it when upgrading. We have a full fact sheet on changes inthis specificationfor Jakarta EE 10, available to download for freehere.
Expression Language
While primarily a major release due to the removal of a long-deprecated method typo (so long isParmetersProvided
!), a number of additional enhancements have also been included in this release!
- The
BeanELResolver
now considers default method implementations when searching for property getters & setters. - LambdaExpressions can now be coerced to a functional interface method invocation.
- Arrays can also now be coerced.
- The API has been updated with Generics.
- The
MethodReference
class can now be used to access details of the method to which aMethodExpression
resolves.
JSON Binding
The backwards compatible change for this release is the dropping of optional @JsonbCreator
parameters. It’s not just removals though, this release brings in deserialization of null values to JsonValue.NULL_VALUE
, support for polymorphic types, and support for using JsonbTypeDeserializer
& JsonbTypeAdapter
as parameter or type annotations.
Security
One of the headline features for this release of Securityis support forOpenID Connectas an authentication mechanism. There are numerous additional changes to this however, including but not limited to new wrappers for HttpAuthenticationMechanism
and IdentityStore,
allowing a user to define custom behaviour.
Server Faces
Faces(no longer JSF!) gets a pretty hefty major release for Jakarta EE 10, bringing in many features. The headline features are a new API to programmatically create Facelets, automatic extensionless mapping, custom cookie attributes, and a smorgasbord of new attributes and tags.
There was also some tidying up done, removing a number of deprecated methods and classes (e.g. ResourceResolver
).
Standard Tag Library
The most prevalent change here is a change in the old xmlns.jcp.org
URLs to URNs – make sure you don’t fall afoul of any copy-paste errors!
SOAP with Attachments
This release drops all references and support for JAXM (Java API for XML Messaging), meaning you can no longer look up a provider through a jaxm.properties file. Other enhancements have also been included, such as SOAPConnection
now implementing AutoClosable
(try-with-resources!)
XML Binding
With XML Binding 4.0support for JAXB 1.0 has been dropped – I hope none of you were still relying on that! Constraints on using java.desktop/java.beans.Introspector
have also been removed, and implementation lookup has been changed.
XML Web Services
TheJakarta Web Services Metadataspecification has been folded into this specification as a part of this release, so be aware that any standalone artefacts for metadata will no longer be updated and published.
Core Profile
Core Profileis the new “distribution” specification being delivered with Jakarta EE 10, providing an even more cut down version of specifications than Web Profile, intended for microservices and ahead-of-time compilation.
Core Profile contains the following specifications:
- Concurrency 3.0
- Dependency Injection 2.0
- Contexts and Dependency Injection Lite 4.0 – emphasis on the Lite!
- RESTful Web Services 3.1
- JSON Binding 3.0
- JSON Processing 2.1
Try It Out!
This was just a high-level overview of some of the changes – there are far more than this present!
As I’m sure many of us have been waiting for, Payara 6is getting some pre-releases that support Jakarta EE 10 to allow you to try it out (as well as the other changes we’ve been working in!). Reading about the changes is all well and good, but I recommend youdownload Payara Serverand start testing out the new changes to really get a good grasp of what’s new.
We have also developed a full fact sheet on Jakarta EE 10 with more detail on what some of the changes mean, please download here:
It covers the changes mentioned with more context as to WHY they were added and how this fits into the overall journey of Jakarta EE under theEclipse Foundation.
Related Posts
Nugget Friday - Preventing Memory Leaks with JDBC Connection Pool Management in Payara Server
Published on 15 Nov 2024
by Luqman Saeed
0 Comments
AI Tools for Jakarta EE at the upcoming Virtual Payara Conference
Published on 14 Nov 2024
by Dominika Tasarz
0 Comments
Virtual Payara Conference is coming next month and on Day 2 - Developer Insight - we will help you unlock the future of Jakarta EE development!
AI Tools for Jakarta EE - 12 December 2024, 3:40pm GMT - Register Here!
Join Gaurav Gupta, Senior ...