Thank you :-),
I have switched to 2.2.1.BUILD-SNAPSHOT and it works. Interesting note is that it works (3 attempts) only in case of definition in such order:
Code:
<int-ftp:request-handler-advice-chain >
<bean id="errorHandler" class="org.springframework.integration.handler.advice.ExpressionEvaluatingRequestHandlerAdvice"/>
<bean id="retyrAdvice" class="org.springframework.integration.handler.advice.RequestHandlerRetryAdvice"/>
</int-ftp:request-handler-advice-chain>
for this one:
Code:
<int-ftp:request-handler-advice-chain >
<bean id="retyrAdvice" class="org.springframework.integration.handler.advice.RequestHandlerRetryAdvice"/>
<bean id="errorHandler" class="org.springframework.integration.handler.advice.ExpressionEvaluatingRequestHandlerAdvice"/>
</int-ftp:request-handler-advice-chain>
there are logged always only two tries <Retry: count=0>,<Retry: count=1> and then it goes to ExpressionEvaluatingRequestHandlerAdvice (even if I use 5 attempts in retryPolicy)
---------------------------------------------------------------------------------------------------
I have also one question regarding Error message which is sent to failureChannel. Please let me know whether I should create new thread for this.
Lets say that this ftp outbound action fails due to non-exsting target path. Without spring-integration or without ExpressionEvaluatingRequestHandlerAdvice I get full stack trace with many "causes" and root cause
java.io.IOException: Failed to write.... Server replied with: 553 Could not create file. which is quite important information.
In my failureChannel where I use following expression I get following message:
Code:
expression="payload.getMessage()+' cause: '+payload.getCause()"
Handler Failed cause: org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice$ThrowableHolderException: org.springframework.integration.MessagingException: Failed to invoke handler
which has only final Exception + cause. Is there somehow possible to get root cause? BTW payload.getCause().getStackTrace().toString() did not help.
Thank you,
Jakub