DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • How to Activate New User Accounts by Email
  • Implementing iOS Accessibility: A Developer's Practical Guide
  • Docker Bake: A Modern Approach to Container Building
  • On SBOMs, BitBucket, and OWASP Dependency Track

Trending

  • 11 Agentic Testing Tools to Know in 2026
  • Evaluating SOC Effectiveness Using Detection Coverage and Response Metrics
  • Hallucination Has Real Consequences — Lessons From Building AI Systems
  • Bridging Gaps in SOC Maturity Using Detection Engineering and Automation
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Runtime-Patching in Mule 4

Runtime-Patching in Mule 4

Explore runtime-patching in Mule 4.

By 
Manish Kumar user avatar
Manish Kumar
·
Aug. 13, 19 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
16.9K Views

Join the DZone community and get the full member experience.

Join For Free

Patching in MUnit is different than how the Mule runtime is patched.

MUnit runs using the embedded container, which downloads all required dependencies to start a container based on a given version. 

Here we need to understand minMuleVersion config defined in your mule-artifact.json. It defines your minimum runtime that is supported to run your Mule app and your Mule munit.

Image title

<properties>
<app.runtime>4.2.0</app.runtime> -- Mule App Runtime
</properties>
<plugin>
    <groupId>com.mulesoft.munit.tools</groupId>
    <artifactId>munit-maven-plugin</artifactId>
    <version>${munit.version}</version>
    <executions>
        <execution>
            <id>test</id>
            <phase>test</phase>
            <goals>
                <goal>test</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
      <runtimeVersion>4.1.5</runtimeVersion> -- Munit Runtime
    </configuration>
</plugin>

You can switch your runtime (app/munit) anytime, but it should not be lower than minMuleVersion defined in your mule-artifact.json file. 

By default, MUnit runs in the studio with the version of the project’s server. You can override this version by specifying the patched runtime version in the MUnit run configuration:

Menu-->Run --> Run Configurations

Under MUnit, select your MUnit test file.

Type the MUnit patched version you want to use in the Mule Runtime Version field, under Advanced Settings or here you can reload from plugin added to your pom.

Image title

Below is the error if you define your minMuleVersion to 4.2.0 and you are trying to deploy your code in 4.1.5 

org.mule.runtime.api.exception.MuleRuntimeException: Artifact hello requires the newest runtime version. Artifact required version is 4.2.0 and Mule Runtime version is 4.1.5

INFO 2019-07-30 20:59:10,367 [WrapperListener_start_runner] org.mule.runtime.module.deployment.internal.StartupSummaryDeploymentListener: 
**********************************************************************
* - - + DOMAIN + - - * - - + STATUS + - - *
**********************************************************************
* default * DEPLOYED *
**********************************************************************

*******************************************************************************************************
* - - + APPLICATION + - - * - - + DOMAIN + - - * - - + STATUS + - - *
*******************************************************************************************************
* hello * UNKNOWN * FAILED *
*******************************************************************************************************
Container app Testing Dependency Download

Published at DZone with permission of Manish Kumar. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • How to Activate New User Accounts by Email
  • Implementing iOS Accessibility: A Developer's Practical Guide
  • Docker Bake: A Modern Approach to Container Building
  • On SBOMs, BitBucket, and OWASP Dependency Track

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook