Added TransactionInterceptorTests.
This commit is contained in:
@@ -104,11 +104,11 @@ public abstract class AbstractMessageHandlerAdapter extends AbstractMethodInvoki
|
||||
}
|
||||
catch (InvocationTargetException e) {
|
||||
throw new MessageHandlingException(message, "Handler method '"
|
||||
+ this.getMethod() + "' threw an Exception.", e.getTargetException());
|
||||
+ this.getMethodName() + "' threw an Exception.", e.getTargetException());
|
||||
}
|
||||
catch (Throwable e) {
|
||||
throw new MessageHandlingException(message, "Failed to invoke handler method '"
|
||||
+ this.getMethod() + "' with arguments: " + ObjectUtils.nullSafeToString(args), e);
|
||||
+ this.getMethodName() + "' with arguments: " + ObjectUtils.nullSafeToString(args), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,10 @@ public abstract class AbstractMethodInvokingAdapter implements MethodInvoker, In
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
protected String getMethodName() {
|
||||
return this.methodName;
|
||||
}
|
||||
|
||||
public void setOrder(int order) {
|
||||
this.order = order;
|
||||
}
|
||||
@@ -102,6 +106,7 @@ public abstract class AbstractMethodInvokingAdapter implements MethodInvoker, In
|
||||
throw new ConfigurationException("An ambiguity exists between the 'method' and 'methodName' properties. " +
|
||||
"Note that only one of them is required, but if both are provided they must match.");
|
||||
}
|
||||
this.methodName = this.method.getName();
|
||||
this.invoker = new DefaultMethodInvoker(this.object, this.method);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user