Skip to content

Java 25 / WildFly 40 / Jakarta EE 11 upgrade#31

Merged
allanmckenzie merged 1 commit into
team/25.104.xfrom
java-25-wildfly-40-upgrade-spike
Jul 10, 2026
Merged

Java 25 / WildFly 40 / Jakarta EE 11 upgrade#31
allanmckenzie merged 1 commit into
team/25.104.xfrom
java-25-wildfly-40-upgrade-spike

Conversation

@allanmckenzie

@allanmckenzie allanmckenzie commented Jul 8, 2026

Copy link
Copy Markdown

Java 25 / WildFly 40 / Jakarta EE 11 upgrade — cpp-context-listing

Upgrades the listing context to Java 25, WildFly 40 and Jakarta EE 11. This is a spike to prove the upgrade end-to-end and hand to the listing/hearing team, who decide the final production approach for the documented items below.

Proven

  • Full reactor builds green under mm (enforcer on, no SNAPSHOT dependencies) — all 25 modules.
  • runIntegrationTests.sh green end-to-end: build → WildFly image → Liquibase → PersistenceTestsIT 56/56 → deploy → pong4/4 healthchecks → deployed-app IT suite 222 tests, 0 failures, 0 errors, 3 skipped.

Key changes

  • javaxjakarta across all modules; beans.xml → EE 4.0; persistence.xml → Jakarta 3.0.
  • DeltaSpike → JPA for all 6 viewstore repositories; jsonb via Hibernate 6 native @JdbcTypeCode(SqlTypes.JSON).
  • Hibernate 6 native-query fixes (typed-null varchar casts on optional filters; uuid alias casts).
  • Test harnesses moved off OpenEJB/DeltaSpike to real-Postgres HibernateTestEntityManagerProvider (PersistenceTestsIT + repository ITs).
  • glassfish jaxb-runtime + XHIBIT NamespacePrefixMapper; jakarta.xml.bind on RAML/messaging generator plugins.
  • junit-platform-launcher aligned to 1.14.3; command-handler test expectations aligned to ZoneOffset.UTC.

For the listing/hearing team to finalise before production

  • hibernate.enable_lazy_load_no_trans=true vs fetch-joins/DTOs for the hearings query path.
  • Hearing native-load-only virtual-column entity design (drove the query + PersistenceTestsIT changes).
  • MI schema-contract test (mireportdata-listing-event-listener) is disabled until mi-reportdata ships a Jakarta build — a re-enable marker is left in listing-event-listener/pom.xml.
  • Confirm WildFly 40 exposes the glassfish NamespacePrefixMapper to the deployment (XHIBIT marshalling).

@allanmckenzie allanmckenzie changed the base branch from main to team/25.104.x July 8, 2026 13:08
@allanmckenzie allanmckenzie force-pushed the java-25-wildfly-40-upgrade-spike branch 7 times, most recently from 9e741f8 to c58dc22 Compare July 9, 2026 13:42
@allanmckenzie allanmckenzie changed the title WIP: Java 25 / WildFly 40 / Jakarta EE 11 upgrade — DO NOT MERGE Java 25 / WildFly 40 / Jakarta EE 11 upgrade Jul 9, 2026
@allanmckenzie allanmckenzie marked this pull request as ready for review July 9, 2026 13:42
@allanmckenzie allanmckenzie requested a review from a team as a code owner July 9, 2026 13:42
@allanmckenzie allanmckenzie force-pushed the java-25-wildfly-40-upgrade-spike branch from c58dc22 to bb5ea18 Compare July 9, 2026 13:55
@@ -75,4 +74,12 @@ private void assertCourtList(final JsonObject courtListJson) {
assertThat(courtListJson.getString("lastExported"), is(lastExported.toString()));
}

private static com.fasterxml.jackson.databind.JsonNode toJsonNode(final String json) {
try {
return new com.fasterxml.jackson.databind.ObjectMapper().readTree(json);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is expensive, need to use existing objectmappers

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks — fixed. We were creating a new ObjectMapper() per call, which is expensive. Now reusing a single producer-configured mapper (new ObjectMapperProducer().objectMapper()) rather than constructing one, in line with the rule that ObjectMappers come from the producer (injected in production, obtained from the producer in tests).

Applied across everything this branch introduced:

  • Production: PublishCourtListEventListener now @Injects the ObjectMapper instead of new ObjectMapper().readTree(...).
  • Tests: the toJsonNode helpers (this file + HearingToJsonConverterTest, RangeSearchQueryTest, HearingQueryViewTest, NotesServiceTest, JsonEntityFinderTest, PersistenceTestsIT) reuse a single producer-supplied mapper; PublishCourtListEventListenerTest uses an @Spy of the producer mapper so @InjectMocks wires a real one.

Note: there are pre-existing new ObjectMapper() usages in ~16 event-listener unit tests and one production util (SlotsToJsonStringConverter, a static method) that predate this branch — happy to sweep those too if you'd like, but left them out to keep this PR scoped to the upgrade changes.

@allanmckenzie allanmckenzie force-pushed the java-25-wildfly-40-upgrade-spike branch 4 times, most recently from 6c05ae7 to 5a1bbd8 Compare July 10, 2026 10:15
Upgrades cpp-context-listing to Java 25, WildFly 40 and Jakarta EE 11.

Proven end-to-end:
- Full reactor builds green under mm (enforcer on, no SNAPSHOT dependencies) — all 25 modules.
- runIntegrationTests.sh green: build -> WildFly image -> Liquibase -> PersistenceTestsIT 56/56 ->
  deploy -> pong -> 4/4 healthchecks -> deployed-app IT suite 222 tests, 0 failures, 0 errors, 3 skipped.

Key changes:
- javax -> jakarta across all modules; beans.xml -> EE 4.0; persistence.xml -> Jakarta 3.0.
- DeltaSpike -> JPA for all 6 viewstore repositories; jsonb via Hibernate 6 native @JdbcTypeCode(SqlTypes.JSON).
- Hibernate 6 native-query fixes (typed-null varchar casts on optional filters; uuid alias casts).
- Test harnesses moved off OpenEJB/DeltaSpike to real-Postgres HibernateTestEntityManagerProvider (PersistenceTestsIT + repo ITs).
- glassfish jaxb-runtime + XHIBIT namespace-prefix mapper; jakarta.xml.bind on RAML/messaging generator plugins.
- junit-platform-launcher aligned to 1.14.3; command-handler test expectations aligned to ZoneOffset.UTC.

Spike for the listing/hearing team — items to finalise before production (documented in commit history / decision notes):
- hibernate.enable_lazy_load_no_trans=true vs fetch-joins/DTOs for the hearings query path.
- Hearing native-load-only virtual-column entity design (drove the query and PersistenceTestsIT changes).
- MI schema-contract test (mireportdata-listing-event-listener) disabled until mi-reportdata ships a Jakarta build.
@allanmckenzie allanmckenzie force-pushed the java-25-wildfly-40-upgrade-spike branch from 5a1bbd8 to bc70f09 Compare July 10, 2026 10:36
@hmcts hmcts deleted a comment from cpp-github-management Bot Jul 10, 2026
@cpp-github-management

Copy link
Copy Markdown

Passed

@allanmckenzie allanmckenzie merged commit 963ea4b into team/25.104.x Jul 10, 2026
3 checks passed
@allanmckenzie allanmckenzie deleted the java-25-wildfly-40-upgrade-spike branch July 10, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants