Method annotated with @Retryable
not getting invoked when called from batch process method.
@Service
public class HierarchyRetryOperationImpl implements HierarchyRetryOperation {
private final HierarchyService hierarchyService;
@Inject
public HierarchyRetryOperationImpl(
HierarchyService hierarchyService){
this.hierarchyService= hierarchyService;
}
@Recover
public HierarchyNode reportFailureReadHierarchyForBatch(SystemException cause) {
return null;
}
@Override
@Retryable(value = SystemException.class , maxAttempts = 4,backoff = @Backoff(delay = 5000))
public HierarchyNode readHierarchy() {
return hierarchyService.readHierarchy( );
}
}