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
Newsletter
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

  • The Pipeline Failed, But the Infrastructure Changed
  • Building a Windows App for a Resilient SSH SOCKS Proxy and Selective Browser Routing
  • Build Production-Ready AI Phone Agents: Infrastructure, Models, and Telephony
  • 5 Mistakes Companies Make When Working With Staff Engineers

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  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
·
Aug. 13, 19 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
17.2K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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