java - spring retry setRetryableExceptions, setFatalExceptions not available -


according spring batch/retry documentation (http://docs.spring.io/spring-batch/reference/html/retry.html) in section 9.2 1 can specify exceptions retry or not retry on via setretryableexceptions or setfatalexceptions when using simpleretrypolicy. however, these methods not defined in current release (1.0.3) in github https://github.com/spring-projects/spring-retry/blob/master/src/main/java/org/springframework/retry/retrypolicy.java .

so, documentation error? if not, methods located?

from source code, seems retryable exceptions can set via constructor takes map of exceptions. there doesn't appear way define fatal exceptions.

maybe can help. have create map holding retryable exceptions classtype, , add policy. similar fatal exceptions.

map<class<? extends throwable>, boolean> r = new hashmap<>(); r.put(retryexception.class, true); simpleretrypolicy p = new simpleretrypolicy(max_retries, r); retrytemplate t = new retrytemplate(); t.setretrypolicy(p); 

Comments

Popular posts from this blog

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

Why can rails not find a route created by a helper? -

php - Redirect and hide target URL -