if I use @Retryable annotation for a method of a certain bean and @scheduled for another method of the same bean, ScheduledAnnotationBeanPostProcessor doesn't process this class and thus @Scheduled method is not executed. This is a very strange problem.
If I remove the @Retryable annotation, ScheduledAnnotationBeanPostProcessor process the bean with processScheduled() method and the scheduled task is executed without any problem.
I already created a ticket to spring-retry project on github (spring-projects/spring-retry#94). Mr. Russell can reproduce the problem with a slightly different symptom. He think that might be an issue with the ScheduledAnnotationBeanPostProcessor.
I just discovered a similar problem with @JmsListener Annotation. If I combine it with another annotation (in this case was a custom Annotation of me @LogMethod) JmsListenerAnnotationBeanPostProcessor doesn't process @JmsListener annotations.
Should I open a separate Ticket? May all *AnnotationBeanPostProcessor's have the same problem?
Let's deal with it as part of this ticket still since we're fixing it for the same target versions anyway. I've applied the same change to JmsListenerAnnotationBeanPostProcessor which is indeed very analogous to ScheduledAnnotationBeanPostProcessor there.
I believe that I hit the same issue when using cloud aws @SqsListener and @Retryable in the same service class, but in this case, I can't find a post-processor related to the SqsListener.
Can you point me where to look for this case? I can probably contribute with a PR if I can fix it.
I experienced the same problem with Spring 4.3.15.
I have @Service annotated class. It has a method say methodA annotated with @Retryable and another one say methodB annotated with @Scheduled.
Immediately after I removed @Retryable annotation from this class, @Scheduled annotation is processed by ScheduledAnnotationBeanPostProcessor. Otherwise the methodB seems like as it has no annotation at all.
The same behaviour repeated if I annotate any method in this class with @Cacheable . That's very strange.