GH-2748: More bean definitions into exceptions
Fixes https://github.com/spring-projects/spring-integration/issues/2748 * Refactor more `MessageHandlingException`s to include `this` into an exception message * Revert using `MessagingException` in some places which really are not about messaging. This helps to wrap them into `MessageHandlingException` later in the `MessageHandler` for the `BeanDefinition` reference * Remove `volatile` from configuration properties in the affected classes * Remove already deprecated `JmsOutboundGateway.setPriority()` * Add `resource` and `source` for `BeanDefinition` in the `AbstractChannelAdapterParser` & `AbstractInboundGatewayParser` * Document the feature
This commit is contained in:
committed by
Gary Russell
parent
0ed88c3268
commit
80d679a9b0
@@ -23,7 +23,6 @@ import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.BeanFactoryAware;
|
||||
import org.springframework.integration.handler.MessageProcessor;
|
||||
import org.springframework.integration.support.utils.IntegrationUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.scripting.ScriptSource;
|
||||
@@ -85,14 +84,9 @@ public abstract class AbstractScriptExecutingMessageProcessor<T>
|
||||
@Override
|
||||
@Nullable
|
||||
public final T processMessage(Message<?> message) {
|
||||
try {
|
||||
ScriptSource source = getScriptSource(message);
|
||||
Map<String, Object> variables = this.scriptVariableGenerator.generateScriptVariables(message);
|
||||
return executeScript(source, variables);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw IntegrationUtils.wrapInHandlingExceptionIfNecessary(message, () -> "Failed to execute script.", e);
|
||||
}
|
||||
ScriptSource source = getScriptSource(message);
|
||||
Map<String, Object> variables = this.scriptVariableGenerator.generateScriptVariables(message);
|
||||
return executeScript(source, variables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user