Classifier<Throwable, Boolean> classifier = new BinaryExceptionClassifier(noRollbackExceptionClasses, false);
// Try to avoid pathological cases where we cannot force a rollback
// (should be pretty uncommon):
if (!classifier.classify(new ForceRollbackForWriteSkipException("test", new RuntimeException()))
|| !classifier.classify(new ExhaustedRetryException("test"))) {
final Classifier<Throwable, Boolean> binary = classifier;
Collection<Class<? extends Throwable>> types = new HashSet<Class<? extends Throwable>>();
types.add(ForceRollbackForWriteSkipException.class);