Skip to content

4.x: Updates for MP upgrade guide #7863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/about/doc_overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ xref:{rootdir}/se/guides/quickstart.adoc[Using the SE Quick Start Guide]
--
Use the upgrade guides to help you upgrade your existing Helidon applications to the latest version of Helidon.

xref:{rootdir}/mp/guides/upgrade_4x.adoc[Upgrade From Helidon MP 4.x]
xref:{rootdir}/mp/guides/upgrade_4x.adoc[Upgrade From Helidon MP 3.x]

xref:{rootdir}/se/guides/upgrade_4x.adoc[Upgrade From Helidon SE 4.x]
xref:{rootdir}/se/guides/upgrade_4x.adoc[Upgrade From Helidon SE 3.x]

--

Expand Down
83 changes: 28 additions & 55 deletions docs/mp/guides/upgrade_4x.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,50 +23,18 @@

include::{rootdir}/includes/mp.adoc[]


In Helidon 4.x we have made some changes to APIs and runtime behavior. This guide
will help you upgrade a Helidon MP 3.x application to 4.x.


== Java 21 Runtime

Java 17 is no longer supported in Helidon 4. Java 21 or newer is required. Please follow the instructions in xref:{rootdir}/about/prerequisites.adoc[Prerequisites] for proper installation.

Helidon 4 no longer uses Netty. Helidon MP is now running on Helidon WebServer which is based on Virtual threads technology, available in Java 21.

Helidon 4 no longer uses Netty. Helidon MP is now running on Helidon WebServer which is based on virtual threads technology, available in Java 21.

== MicroProfile 6.0 support

MicroProfile 6.0 enables MicroProfile APIs to be used together with Jakarta EE 10 Core Profile.

MicroProfile 6.0 is an umbrella for the following specifications and their corresponding versions:

* Open Telemetry {version-lib-microprofile-telemetry}
* MicroProfile Config {version-lib-microprofile-config}
* MicroProfile Fault Tolerance {version-lib-microprofile-fault-tolerance-api}
* MicroProfile Health {version-lib-microprofile-health}
* MicroProfile JWT Authentication {version-lib-microprofile-jwt}
* MicroProfile Metrics {version-lib-microprofile-metrics-api}
* MicroProfile OpenAPI {version-lib-microprofile-openapi-api}
* MicroProfile Rest Client {version-lib-microprofile-rest-client}

Includes:

* Jakarta EE Core Profile {version-lib-jakarta-core}

Helidon 4.x supports the following Jakarta EE specifications:

* CDI (Jakarta Contexts and Dependency Injection) {version-lib-jakarta-cdi}
* JAX-RS (Jakarta RESTful Web Services) {version-lib-jakarta-jaxrs-api}
* JSON-B (Jakarta JSON Binding) {version-lib-jakarta-jsonb-api}
* JSON-P (Jakarta JSON Processing) {version-lib-jakarta-jsonp-api}
* Jakarta Annotations {version-lib-jakarta-annotations-api}
* Jakarta Persistence API {version-lib-jakarta-persistence-api}
* Jakarta Transactions API {version-lib-jakarta-transaction-api}
* Jakarta WebSocket API {version-lib-jakarta-websockets-api}
* Jakarta Bean Validation {version-lib-jakarta-bean-validation}

Corresponding changes to Helidon code were made to support the corresponding specifications' versions.
MicroProfile 6.0 enables MicroProfile APIs to be used together with Jakarta EE 10 Core Profile.

=== MicroProfile specifications

Expand Down Expand Up @@ -100,6 +68,10 @@ Incompatible changes described in link:https://download.eclipse.org/microprofile
+
Incompatible changes described in link:https://download.eclipse.org/microprofile/microprofile-rest-client-3.0/microprofile-rest-client-spec-3.0.html#_incompatible_changes[MicroProfile Rest Client {version-lib-microprofile-rest-client} Specification]

* *MicroProfile Telemetry Tracing {version-lib-microprofile-telemetry}*:
+
Incompatible changes described in link:https://download.eclipse.org/microprofile/microprofile-telemetry-1.0/tracing/microprofile-telemetry-tracing-spec-1.0.html#_incompatible_changes[MicroProfile Telemetry Tracing {version-lib-microprofile-telemetry} Specification]

=== Supported Jakarta EE specifications

* *CDI (Jakarta Contexts and Dependency Injection) {version-lib-jakarta-cdi}*:
Expand All @@ -108,12 +80,15 @@ Changes described in link:https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-

* *JAX-RS (Jakarta RESTful Web Services) {version-lib-jakarta-jaxrs-api}*:
+
Changes described in link:https://download.eclipse.org/microprofile/microprofile-rest-client-3.0/microprofile-rest-client-spec-3.0.html#_incompatible_changes[JAX-RS (Jakarta RESTful Web Services) {version-lib-jakarta-jaxrs-api}Specification]
Changes described in link:https://download.eclipse.org/microprofile/microprofile-rest-client-3.0/microprofile-rest-client-spec-3.0.html#_incompatible_changes[JAX-RS (Jakarta RESTful Web Services) {version-lib-jakarta-jaxrs-api} Specification]

* *JSON-B (Jakarta JSON Binding) {version-lib-jakarta-jsonb-api}*:
+
Changes described in link:https://jakarta.ee/specifications/jsonb/2.0/jakarta-jsonb-spec-2.0.html#change-log[JSON-B (Jakarta JSON Binding) {version-lib-jakarta-jsonb-api} Specification]

* *JSON-P (Jakarta JSON Processing) {version-lib-jakarta-jsonp-api}*:
+
Changes described in link:https://jakarta.ee/specifications/jsonp/2.1/apidocs/[JSON-P (Jakarta JSON Parsing) {version-lib-jakarta-jsonp-api} Specification]

* *Jakarta Annotations {version-lib-jakarta-annotations-api}*:
+
Expand All @@ -139,27 +114,9 @@ NOTE: Please, read each specification carefully for incompatible changes!

=== Significant changes

==== Smallrye

Smallrye group id was `org.jboss.jandex` and now is `io.smallrye`.
==== Jandex

==== Metrics and observability

The correct work of observability in quickstarts now requires dependencies:

[source, xml]
----
<dependency>
<groupId>io.helidon.webserver.observe</groupId>
<artifactId>helidon-webserver-observe-metrics</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.helidon.metrics</groupId>
<artifactId>helidon-metrics-system-meters</artifactId>
<scope>runtime</scope>
</dependency>
----
Jandex group id was `org.jboss.jandex` and now is `io.smallrye`.

==== Testing

Expand All @@ -185,6 +142,22 @@ Now is:
</dependency>
----

And the Java package has changed from `io.helidon.microprofile.tests.junit5` to `io.helidon.microprofile.testing.junit5`

=== Logging

The Helidon console handler has changed from `io.helidon.common.HelidonConsoleHandler` to `io.helidon.logging.jul.HelidonConsoleHandler`.

If you use this handler in your `logging.properties` you will need to update it and add the following dependency:

[source, xml]
----
<dependency>
<groupId>io.helidon.logging</groupId>
<artifactId>helidon-logging-jul</artifactId>
<scope>runtime</scope>
</dependency>
----

== Conclusion

Expand Down