code: private boolean rollbackIfNecessary(final Transactional transactional,
                                        final Exception e,
                                        final DefaultConnectionProvider conn) {
      boolean commit = true;
  
      //check rollback clauses
      for (Class<? extends Exception> rollBackOn : transactional.rollbackOn()) {
  
        //if one matched, try to perform a rollback
        if (rollBackOn.isInstance(e)) {
          commit = false;
  
          //check ignore clauses (supercedes rollback clause)
          for (Class<? extends Exception> exceptOn : transactional.ignore()) {
            //An exception to the rollback clause was found, DON'T rollback
            // (i.e. commit and throw anyway)
            if (exceptOn.isInstance(e)) {
              commit = true;
              break;
            }
          }
  
          //rollback only if nothing matched the ignore check
          if (!commit) {
            logger.debug("Rolling back JDBC transaction for this thread");
            conn.rollback();
          }
          //otherwise continue to commit
  
          break;
        }
      }
  
      return commit;
    }
docs: Returns True if rollback DID NOT HAPPEN (i.e. if commit should continue).
  
  @param transactional The metadata annotation of the method
  @param e             The exception to test for rollback
  @param txn           A JPA Transaction to issue rollbacks on