Skip to content

Latest commit

 

History

History
145 lines (117 loc) · 11.8 KB

QUARKUS-2736.md

File metadata and controls

145 lines (117 loc) · 11.8 KB

QUARKUS-2736 - Quarkus 3.x should use Jakarta EE 10 APIs

JIRA: https://issues.redhat.com/browse/QUARKUS-2736

PR: quarkusio/quarkus#30856 (mainly)

Jakarta EE 10 has been integrated with the Quarkus main branch since the Quarkus 3.0.0.Alpha4. The most visible change is renaming of the packages from javax to jakarta, but Jakarta EE 10 comes with new features added to the specifications, and their implementations. The Quarkus codebase has been adjusted, mainly Quarkus ArC, RESTEasy Classic and RESTEasy Reactive. There is a straightforward way to migrate simple Maven projects using a JBang script. For most things, migration to Jakarta EE 10 doesn't cause any issues, however Quarkus experienced some issues due to dependencies that didn't migrate to Jakarta yet. For example REST Assured only worked with Jackson, not with JSON-B, as there were no version of the REST Assured supporting the Jakarta packages.

Probably the most significant breaking change is migrating to the Jakarta Persistence Provider - Hibernate 6.2. Quarkus is still going to target Jakarta EE 9 in certain areas, Angus Jakarta Mail is an excellent example. It is important to keep in mind that QUARKUS-2736 is about migrating Java EE APIs already implemented by Quarkus to the Jakarta, not making Quarkus fully compliant with the Jakarta EE 10 specification. However, there is ongoing effort to draw nearer specification in certain areas, such as CDI Lite compliance (CDI 4.0). Quarkus deliberately fails to meet these specification requirements, that doesn't go well with Quarkus principles and concept. For example, Quarkus RESTEasy implementation choose to disable default exception mappers as Vert.X error handling provides greater capabilities.

Scope of testing

Tests should verify:

Existing tests

Naming migration of packages and imports from javax to jakarta has already been done, there was no regression caused by the migration, however we had to disable temporarily several tests using Quarkiverse extensions that don't have Jakarta version yet. Such examples are Quarkus Artemis, Kogito, Quarkus Pact and Quarkus Camel. Similarly, we disabled tests using external applications like Quarkus Quickstarts, Quarkus TODO, Quarkus Workshop etc. Enabling this test will sufficiently prove there is no regression.

ArC changes are verified by newly enabled ArC TCK tests that are run as part of the upstream CI.

Our tests that use Hibernate 6.2 all required changes regarding sequence generation, dialects and some also needed schema migration changes. Our Quarkus Jdk specifics Test Suite cover changes in Hibernate Query Language semantics not related to Jakarta as proved by required changes. It's safe to say Quarkus Test Suite covers major Hibernate 6.2 breaking changes related to Jakarta EE 10 migration.

Default exception mappers introduced by RESTEasy Classic are covered upstream as the mappers were actually disabled in reaction to failing tests.

Elytron Security migration is sufficiently covered by Quarkus QE Test Suite, Quarkus Quickstarts run as part of upstream CI and upstream integration modules.

Impact on test suites and test environment

Quarkus Test Suite should cover newly introduced configuration properties that enforces legacy behavior and provides smooth migration.

The SameSite cookies added by Jakarta REST Services 3.1 will require one unit test with multiple HTTP requests. Possibility to use @Inject introduced RESTEasy Classic CDI will be done by migration part of injections done with @Context. For example, we will replace annotation on the injection point of the UriInfo.

All test suites should be refactored to use new names (Jakarta Persistence, Jakarta REST).

Manual verification

RESTEasy Reactive changes regarding jakarta.ws.rs.ext.RuntimeDelegate additions should be inspected manually as they are exclusively dummy methods that throw UnsupportedOperationException and are only used in rare scenarios.

We need to assess possible use cases for getSSLContext of the BearerTokenClientEndpointConfigurator just to be sure that it is safe to return null and do nothing.

Impact on resources:

  • No additional requirements for resources in lab
  • Required additional time for the test execution should be below 4 minutes as we expect but a small code additions
  • No measurable additional requirements for a Native image scenario

Getting familiar with the feature

Following actions were taken to ensure familiarity:

  • Ensure documentation provides clear explanation on configuration options
  • Ensure good user experience and simplicity of use

Contacts

References