Bugzilla – Bug 4151
spec questions on skippable exceptions: write, runtime exceptions, exclude
Last modified: 2013-01-16 23:06:28 UTC
Some questions on skippable exceptions (which basically apply to retryable, no-rollback exceptions too):
1) See my email to the issues mailing list w/ Subject
"Interaction of SkipListener and chunked writes"
2) The language of the spec currently seems to allow for subjecting runtime exceptions to the skip (and retry) processing. This could get tricky... if the runtime exception is coming from the batch container, then it might cause some complications if that can be caught and "skipped". Could a runtime even end up in an inconsistent state somehow?
It seems one option would be to flat out disallow this in the spec wording (even though we can't easily express this in the method signature of read/write/process where we say "throws Exception"). OTOH, what if there is an API that throws a predictable runtime exception that the JSR352 developer would like to skip... it would be a bit odd to ask them to catch a RuntimeException just to throw a checked exception.
I think the current language is fine, just wanted to make sure this issue was considered.
3) This one almost doesn't need to be asked:
If I have just an "exclude".. I'm not going to match anything, right? We basically start with an implicit <exclude class="*"/> (not that using a wildcard here is legal), so until you <include> something, <exclude> has no further affect.
I think there are no restrictions on which exceptions can be skipped or retried. Even if they originated in the batch runtime. Afterall, there is nothing stopping the application catching any and every exception and preventing the batch runtime from seeing those exceptions again.
Yes, exclude qualifies include.