in jbatch/src/main/java/org/apache/batchee/container/impl/controller/chunk/RetryHandler.java [40:82]
public RetryHandler(final Chunk chunk) {
try {
if (chunk.getRetryLimit() != null) {
_retryLimit = Integer.parseInt(chunk.getRetryLimit());
if (_retryLimit < 0) {
throw new IllegalArgumentException("The retry-limit attribute on a chunk cannot be a negative value");
}
}
} catch (final NumberFormatException nfe) {
throw new RuntimeException("NumberFormatException reading retry-limit", nfe);
}
if (chunk.getRetryableExceptionClasses() != null) {
if (chunk.getRetryableExceptionClasses().getIncludeList() != null) {
final List<ExceptionClassFilter.Include> includes = chunk.getRetryableExceptionClasses().getIncludeList();
for (final ExceptionClassFilter.Include include : includes) {
retryConfig.getIncludes().add(include.getClazz().trim());
}
}
if (chunk.getRetryableExceptionClasses().getExcludeList() != null) {
final List<ExceptionClassFilter.Exclude> excludes = chunk.getRetryableExceptionClasses().getExcludeList();
for (final ExceptionClassFilter.Exclude exclude : excludes) {
retryConfig.getExcludes().add(exclude.getClazz().trim());
}
}
}
if (chunk.getNoRollbackExceptionClasses() != null) {
if (chunk.getNoRollbackExceptionClasses().getIncludeList() != null) {
final List<ExceptionClassFilter.Include> includes = chunk.getNoRollbackExceptionClasses().getIncludeList();
for (final ExceptionClassFilter.Include include : includes) {
retryNoRBConfig.getIncludes().add(include.getClazz().trim());
}
}
if (chunk.getNoRollbackExceptionClasses().getExcludeList() != null) {
final List<ExceptionClassFilter.Exclude> excludes = chunk.getNoRollbackExceptionClasses().getExcludeList();
for (final ExceptionClassFilter.Exclude exclude : excludes) {
retryNoRBConfig.getExcludes().add(exclude.getClazz().trim());
}
}
}
}