Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Complete
-
2.1 GA
Description
In the GatewayProxyFactoryBean the reply timeout is overwritten by the annotation value, if an gateway annotation is given. IMHO this is an error because no where it is explained that there is a default value in the gateway annotation, where this value is set to -1 (unbound). So in case the property is set and the annotation is used as explained in the documentation, it overwrittes the reply timeout, without any notice to the developer.
The interesting lines are (#336 and following)
Gateway gatewayAnnotation = method.getAnnotation(Gateway.class);
long replyTimeout = this.defaultReplyTimeout;
if (gatewayAnnotation != null) {
replyTimeout = gatewayAnnotation.replyTimeout();
This should either be fixed by adding a note in the documentation or by changing the code
if (gatewayAnnotation.replyTimeout() > replyTimeout)
{ relyTimeout = gatewayAnnotation.replyTimeout(); }It took me several hours to find out why the reply timeout stayed to unbound, even if the property was set correctly. In the documentation there is no hint that the annotation has a default value of -1. IMHO the property should overwrite the annotation.