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

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

javascript - jquery or ashx not working -

php - Redirect and hide target URL -