

Runtime-Patching in Mule 4
source link: https://www.tuicool.com/articles/AbMfeeu
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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.
<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 .
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 * *******************************************************************************************************
Recommend
-
50
In this article, we will learn how to include pom dependency (jar) files that are excluded by default in Mule, details of the error, and debug procedure. Deployment Error:
-
50
In this article, I will explain how to leverage the Dataweave Language on performing data filtering. For instance, we need to prepare a payload for a Salesforce Upsert Operation where the initial records (Contacts) came f...
-
50
Mule 4: JMS Pub and Sub With Transformation DZone's Guide to Mule 4: JMS Pub and Sub With Transformation Take a look at a tutorial that explains how to conne...
-
9
Mule ESB 3使用要点 Mule ESB 3使用要点 参与翻译可以联系:[email protected] Mule是一个灵活的消息处理和集成框架。你使用Mule的方式取决于你要尝试解决的问题。Mule3提供了多种配置构建方法,这些方法可...
-
10
MuleSoft — SNS Connector Anypoint Connector for Amazon SNS (Amazon SNS Connector) provides connectivity to the Amazon Simple Notification Service (Amazon SNS) API, enabling you to build distributed web-enabled applic...
-
9
Introduction Mule 4.4 version was released on November 2021. This version includes: Enhancements on Logging mechanism C...
-
6
Introduction Data security is an important aspect of the digital world. It helps to prevent data breaches, reduces the risk of data exposure, secures sensitive data, and is highly recommended for the regulatory compliance process. Wi...
-
10
In Part 1 of this series, we looked at two features of Mule CloudHub Connector. In total, there are 5 features provided by this connector as listed below: G...
-
6
To start developing API in Mule for this use case, we need to first create a project in Google Cloud Platform. So let us first complete the setup for it. Setting Up Google Cloud Platform Log in to
-
7
Mulesoft DataWeave is a simple powerful tool to transform data inside a flow. Numerous core operators and functions are already present to perform various operations such as capitalize, camelize, upper, and lower. For string operations...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK