code: public void yieldConnection(Connection con) throws FetchException {
          try {
              if (con.getAutoCommit()) {
                  closeConnection(con);
              }
              // Connections which aren't auto-commit are in a transaction. Keep
              // them around instead of closing them.
          } catch (Exception e) {
              throw toFetchException(e);
          }
      }
docs: Gives up a connection returned from getConnection. Connection must be
  yielded in same thread that retrieved it.