AVIO Consulting

Navigating the Java-Mule Migration Express: Embracing Mule 4.6 and Java 17

Mar 4, 2024 | Java, MuleSoft

The Java Release Train

Java 8 was released in March 2014, almost 10 years back. For most of this time, Java 8 ruled the Java ecosystem. Until the Java Release train was announced [1] in late 2017 – a new, fast-paced release cycle was adopted for Java development. A new version of Java has been released every 6 months since then and a long-term support (LTS) release every 3 years. Beginning Java 9, Project Jigsaw introduced a new Java Platform Module System (JPMS)[2] which restructured how Java classes are organized and shared.  The next LTS version with JPMS was Java 11, released in 2018. Java ecosystem jumped on this release train early on and worked toward adopting the newer versions of Java. For the next couple of years, the migration and upgrades from Java 8 to higher versions continued. Many frameworks and libraries dropped the support for Java 8 to benefit from all the new features added to the language. The JetBrains Development Ecosystem survey for Java[3] shows the trends in Java version adoptions, Java 17 adoption has been increasing since its release. Java 21 LTS was released in late 2023 but it is too early to visualize its adoption in this.

Mule Parallels with Java

When Mule 3 was released in late 2010, Java 6 was the LTS version. By the time Mule 4 came into the market in late 2017, Java 8 was alive and kicking. The Mule Runtime 4, along with other Anypoint Platform components such as Anypoint Studio, Anypoint Exchange, CloudHub, RTF, and others has been leveraging Java 8 since then.

Java has largely been Mule’s primary development language since its inception, and historically, Mule updates have been on an ad-hoc release cycle. But now with the fast-paced Java releases, there was an obvious demand for the Mule ecosystem to support the latest versions of Java.

The next step towards Mule’s Java upgrade happened when a new release cadence for Mule Runtime was announced[4] in late 2023 targeting Mule Runtime 4.5.0 and later versions. Two new release channels – Long-Term Support (LTS) and Edge were introduced for the release cycle. This probably set the fast-paced release cycles to catch up with the latest version of Java.

Onwards to Java 17

Mule Runtime 4.2.0 partially supported Java 11. It still required applications to be compiled with Java 8 but supported running them on Java 11 or Java 8.

MuleSoft released Mule Runtime 4.6.0 in Feb 2024 which also adds support for Java 17 LTS.
This is a crucial and much-needed leap for the Mule ecosystem. This change is mainly driven by two critical reasons:

  • Third-party libraries used by platform components dropping or limiting support for Java 8.
  • Enabling Mule applications and policies to leverage Java 17 capabilities.

For these same reasons, the users should prioritize upgrading their Mule environments and applications to Mule 4.6.0+.

The Mule 4.6.0 runtime provides a migration path for users by supporting both Java 8 and Java 17. The standard support for 4.6.0 ends in Feb 2025 and extended support ends in Feb 2026. Mule Runtime 4.6.0 will be the last LTS version that supports  Java 8 and Java 11 until the end of Feb 2026 i.e. with the end of extended support for 4.6.0. The next LTS version, Mule Runtime 4.9.0, will support Java 17 only. So, customers should plan their upgrades to 4.6.0 through 2024.

Platform Components with Java 17

The upgrade process can include various components of the Anypoint Platform. Each of those is enhanced to improve the experience of using Java versions.

Mule-built Anypoint Connectors are incrementally being updated to Java 17. See the current list of Java 17 compatible connectors.

Mule SDK, XML SDK, and REST Connect are updated for Java 17 compatibility to allow updating any custom connectors before upgrading the applications.

Anypoint Studio v7.17 enhances the experience of managing Java versions used by the projects. It provides automatic suggestions as well as guidance regarding Java compatibility of various connectors used in the projects. MUnit will automatically inherit the Java settings from the Studio project.

Anypoint Exchange will simplify the identification of Java 17-compatible connectors by providing additional information.

Anypoint Runtime Manager adds configurations to allow choosing the Java version for deployments.

Upgrade to  Java 17

With Java 17 support for the Anypoint Platform, it is time to start planning and prioritizing upgrades to your Mule environments. Depending on the deployment strategies and components used, the upgrade steps may differ. In general, however, the following covers common steps in the upgrade path:

  • Ensure the application version compatibility by validating the Mule Runtime Version compatibility as described by Semantic versioning (MAJOR.MINOR.PATCH)
    • Applications from 3.x to 4.x aren’t compatible
    • Applications from 4.1.0 and 4.2.0 are mostly compatible
    • Applications from 4.2.2 and 4.2.3 are fully compatible
  • If applicable, upgrade Mule Runtimes installed in Standalone mode or Managed through Runtime Manager
  • Verify the list of MuleSoft-built Java 17-compatible connector’s list and ensure all used connectors are upgraded
  • Upgrade any custom extensions, modules, connectors, and Policies to be compatible with Java 17
  • Update applications to use upgraded components
  • Deploy and test applications to Mule Runtime 4.6.0 Java 17
  • Perform Performance testing for the applications on Java 17

Timeline to know

  • Mule Runtime 4.6.0 along with all other related components, except Anypoint Studio, are available with February 2024 release
  • Anypoint Studio v7.17 is expected to GA at the end of March
  • Java 8 and Java 11 support ends by February 2026
  • Mule Runtime 4.9.0 LTS planned to release by February 2025 will support Java 17 only

What next?

Release trains are picking up speed now, whether it is a Java Release Train or Mule Release Cadence. It is time to start planning your boarding. Depending on various aspects of the environments such as the number of applications, deployment strategy, testing, and more, the journey experience may vary. It is advisable to start planning and taking steps for it.

[1] Java Release Train announcement
[2]  Java Platform Module System (JPMS)
[3] JetBrains Development Ecosystem Survey for Java
[4] Mule Runtime Release Cadence
MuleSoft Java 17 Upgrade FAQ