Windmüller
Crownpeak employee
Crownpeak employee

JakartaEE FAQ

What is JakartaEE?

JakartaEE (formerly JavaEE) is a specification for Java applications and mostly used for web applications. Application servers like Apache Tomcat can be used to run applications implementing the respective APIs, e.g., the Servlet API.

JavaEE was maintained by Oracle. In 2017, Oracle announced that future development will be performed by the Eclipse Foundation. The first version with the new name JakartaEE was released in 2019, maintaining full compatibility.

Why Does This Change Produce Incompatibilities?

Because of trademark issues for the name “Java”, the existing package names used in the APIs could no longer be used. So with the release of JakartaEE 9 in 2020, the namespace changed from “javax” to “jakarta”. For example, a class implementing a Servlet would contain an import for javax.servlet.http.HttpServlet:

 

import javax.servlet.http.HttpServlet;

 

With JakartaEE 9 and later, this class is no longer available, so existing code must be modified:

 

import jakarta.servlet.http.HttpServlet;

 

Most application servers like Apache Tomcat can handle only one of the APIs. For example, Tomcat versions up to 9.x support JavaEE while any version starting from 10.x only supports JakartaEE.

Am I Affected by This Change?

If you host your own FirstSpirit instance or develop modules for FirstSpirit it is very likely that you are affected.

Is my FirstSpirit Instance Affected?

Your FirstSpirit installation is affected if at least one of the following conditions applies:

  • Your FirstSpirit installation is not maintained in the Crownpeak Cloud and deploys web-applications to an application server like Apache Tomcat.
  • You use a custom module containing a web-app component with code that uses the old JavaEE API, e.g., the Servlet API.
  • You use a custom module containing a web-app component with dependencies which use the old JavaEE API, e..g., Spring Boot 2.x.

Is my Custom Module Affected?

Your module is affected if at least one of the following conditions applies:

  • Your module contains a web-app component with code that uses the old JavaEE API, e.g., the Servlet API.
  • Your module contains a web-app component with dependencies which use the old JavaEE API, e..g., Spring Boot 2.x.

What is the Current Status of FirstSpirit?

The current versions of FirstSpirit implement the JavaEE API. As an application server, Apache Tomcat in version 9 is recommended. Modules containing web-app components must not use the JakartaEE API at this point.

 

Do I Have to Prepare a New Module Version Right Now?

Probably not.

When the first version of FirstSpirit with support for JakartaEE is released, it will contain an automatic migration tool that translates JavaEE API to JakartaEE API. Our internal tests show that most existing modules will work as before. However, there are some drawbacks:

  • Deployment time will increase because of the transformation process
  • Signed jars cannot be migrated because that you break the signature

If you have the chance to test your setup on a local FirstSpirit server, we highly recommend performing those tests as early as possible.

Please note: With the first release of the FirstSpirit Jakarta Edition (2023.9) we will start a transition period of 12 months during which unchanged modules will still be supported. This period must be used to migrate the module to the JakartaEE API.

How can I Prepare for the Upcoming Changes?

We recommend testing your existing modules locally with a version of FirstSpirit supporting JakartaEE. For this, we provide current snapshot versions of the fs-isolated-server.jar to be used in local installations as well as a Docker image shortly.

What Steps are Necessary to Migrate a Module?

Since each module is unique, we can only provide rough guidelines for migrating your existing code:

  1. In your build tool, search for dependencies of the type javax.servlet:javax.servlet-api and replace them with jakarta.servlet:jakarta.servlet-api in Version 6.0.0.
  2. Additionally, search for dependencies using JavaEE and replace them with newer versions, if available. For example, Spring Boot needs to be updated to 3.0.0 or later.
  3. Fix any compile errors occurring after performing the first two steps.
  4. Specify the XML schema version in the module descriptor. FirstSpirit will evaluate this and skip the automatic migration:

 

<web-app xml-schema-version="6.0">

 

Build and test your module thoroughly.

Current Timeline

  • 2023-06 Beta-version of the FirstSpirit JakartaEE Edition is available for testing
  • 2023-08 Stable release (2023.9) with support for automatic migration
  • 2024-08 Support for automatic migration is removed with FirstSpirit 2024.9

Cloud Migration Schedule

To provide enough time for customers who use our SaaS offering to test the compatibility with custom modules, the JakartaEE Edition of FirstSpirit will be rolled out in three phases. This ensures that developers can test their modules thoroughly while the prod instance remains unchanged as long as possible.

Labels (1)