Getting Started With Jakarta EE 9
The times, they are a-changing.
Join the DZone community and get the full member experience.
Join For FreeJakarta EE 9 has officially been released on 22 November 2020 making it the first official release from Eclipse Foundation that completely moved away from the Oracle copywritten Java EE namespace.
So what can we look forward to with this release?
Objectives with Jakarta EE 9
The main objective of Jakarta EE 9 is to deliver a set of specifications functionally similar to Jakarta EE 8 but in the new Jakarta EE 9 namespace jakarta.*
. That’s right: the old javax.*
namespace has been replaced by the jakarta.*
namespace. This makes it the very first official Jakarta EE release that is not reliant on the previous Oracle namespace.
Changes in Jakarta EE 9
With the shift of the Jakarta EE namespace, developers must be aware of changes and updates on the following:
- Every API were transitioned from
javax
namespace tojakarta
namespace. This means that the Jakarta EE specifications were changed to reflect the API changes, as well as the implementation specifications of the API, were changed to handle the new APIs. - Jakarta EE 9 release removes specifications from Jakarta EE 8 that were old, optional, or deprecated in order to reduce the surface area of the APIs. Thus, CORBA implementations no longer exist in Jakarta EE 9. SOAP specifications are deemed stable. There won’t be any future plans to work on the technology.
- All specifications included in the Jakarta EE 9 release have been versioned to a new major version of the specification document. For example, JPA 2.x (in Jakarta EE 8) is now JPA 3.0 in Jakarta EE 9.
- No backward compatibility. Jakarta EE 9 is not backward-compatible with Jakarta EE 8 or Java EE 8. It’s not recommended to mix Jakarta EE 8 artifacts with Jakarta EE 9 and vice versa.
Migrating to Jakarta EE 9
Migrating to Jakarta EE 9 will require that developers must begin transitioning to Jakarta EE 9 compatible application servers. Currently, at the time of writing this post, Glassfish 6 supports Jakarta EE 9. Until other vendors release Jakarta EE 9 compatible products and applications servers, user migration and transitioning to Jakarta EE 9 might take a while. Note that this might be an expensive exercise to upgrade to Jakarta EE 9 so users must be aware of whether the rich feature set that comes Jakarta EE 9 is worth the upgrade.
For developers willing to start working with Jakarta EE 9 release, one needs to just update their pom.xml
(if the project is Mavenized), by adding the following dependency:
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>9.0.0</version>
<scope>provided</scope>
</dependency>
And ensuring that they organize their import to change their namespace from javax
to jakarta
. Jakarta EE 9 is compatible with Java SE 8.
In Conclusion
This is the 2nd official release of Jakarta EE APIs and specifications since Oracle donated Java EE to the Eclipse Foundation and Jakarta EE 9 release that has fully migrated away from Oracle.
Though we’re still waiting for Jakarta EE 9 certified application servers (Eclipse GlassFish 6 is the only application server that is Jakarta EE 9 certified), Eclipse Foundation has made it simple for developers to easily migrate to Jakarta EE 9 without too much hassle, thanks to the fact that the specification is similar as Jakarta EE 8.
Happy coding and let us know the challenges that you encounter when migrating to Jakarta EE 9.
Opinions expressed by DZone contributors are their own.
Comments