diff --git a/src/main/java/org/mule/runtime/api/config/MuleRuntimeFeature.java b/src/main/java/org/mule/runtime/api/config/MuleRuntimeFeature.java index 29afb368f..639f7a463 100644 --- a/src/main/java/org/mule/runtime/api/config/MuleRuntimeFeature.java +++ b/src/main/java/org/mule/runtime/api/config/MuleRuntimeFeature.java @@ -23,6 +23,7 @@ import static org.mule.runtime.api.util.MuleSystemProperties.HANDLE_SPLITTER_EXCEPTION_PROPERTY; import static org.mule.runtime.api.util.MuleSystemProperties.HONOUR_RESERVED_PROPERTIES_PROPERTY; import static org.mule.runtime.api.util.MuleSystemProperties.PARALLEL_FOREACH_FLATTEN_MESSAGE_PROPERTY; +import static org.mule.runtime.api.util.MuleSystemProperties.REUSE_GLOBAL_ERROR_HANDLER_PROPERTY; import static org.mule.runtime.api.util.MuleSystemProperties.SET_VARIABLE_WITH_NULL_VALUE_PROPERTY; import static org.mule.runtime.api.util.MuleSystemProperties.START_EXTENSION_COMPONENTS_WITH_ARTIFACT_CLASSLOADER_PROPERTY; import static org.mule.runtime.api.util.MuleSystemProperties.TO_STRING_TRANSFORMER_TRANSFORM_ITERATOR_ELEMENTS_PROPERTY; @@ -304,6 +305,14 @@ public enum MuleRuntimeFeature implements Feature { VALIDATE_APPLICATION_MODEL_WITH_REGION_CLASSLOADER( "When enabled, the application model will be validated with the region classloader. When disabled, it will be validated with the application classloader.", "W-10808757", "4.5.0", VALIDATE_APPLICATION_MODEL_WITH_REGION_CLASSLOADER_PROPERTY), + /** + * When enabled, the global error handlers will be reused instead of creating local copies. + * + * @since 4.5.0 + */ + REUSE_GLOBAL_ERROR_HANDLER( + "When enabled, the global error handlers will be reused instead of creating local copies.", + "W-10888504", "4.5.0", REUSE_GLOBAL_ERROR_HANDLER_PROPERTY), ; private final String description; diff --git a/src/main/java/org/mule/runtime/api/util/MuleSystemProperties.java b/src/main/java/org/mule/runtime/api/util/MuleSystemProperties.java index 51f04e14f..527c463f7 100644 --- a/src/main/java/org/mule/runtime/api/util/MuleSystemProperties.java +++ b/src/main/java/org/mule/runtime/api/util/MuleSystemProperties.java @@ -533,6 +533,14 @@ public final class MuleSystemProperties { public static final String REVERT_SIGLETON_ERROR_HANDLER_PROPERTY = SYSTEM_PROPERTY_PREFIX + "revert.singletonErrorHandler"; + /** + * If set to true, the global error handlers will be reused instead of creating local copies. + * + * @since 4.5.0, 4.4.1, 4.3.1 + */ + public static final String REUSE_GLOBAL_ERROR_HANDLER_PROPERTY = + SYSTEM_PROPERTY_PREFIX + "reuse.globalErrorHandler"; + /** * @return {@code true} if the {@link #TESTING_MODE_PROPERTY_NAME} property has been set (regardless of the value) */