server/container/util/src/main/java/org/apache/james/util/sql/SqlResources.java [281:298]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private String matchDbConnection(Connection conn, Element dbMatchersElement) throws SQLException {
        String dbProductName = conn.getMetaData().getDatabaseProductName();

        NodeList dbMatchers = dbMatchersElement.getElementsByTagName("dbMatcher");
        for (int i = 0; i < dbMatchers.getLength(); i++) {
            // Get the values for this matcher element.
            Element dbMatcher = (Element) dbMatchers.item(i);
            String dbMatchName = dbMatcher.getAttribute("db");
            Pattern dbProductPattern = Pattern.compile(dbMatcher.getAttribute("databaseProductName"), Pattern.CASE_INSENSITIVE);

            // If the connection databaseProcuctName matches the pattern,
            // use the match name from this matcher.
            if (dbProductPattern.matcher(dbProductName).find()) {
                return dbMatchName;
            }
        }
        return null;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



mailet/ai/src/main/java/org/apache/james/ai/classic/SqlResources.java [199:216]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private String matchDbConnection(Connection conn, Element dbMatchersElement) throws SQLException {
        String dbProductName = conn.getMetaData().getDatabaseProductName();

        NodeList dbMatchers = dbMatchersElement.getElementsByTagName("dbMatcher");
        for (int i = 0; i < dbMatchers.getLength(); i++) {
            // Get the values for this matcher element.
            Element dbMatcher = (Element) dbMatchers.item(i);
            String dbMatchName = dbMatcher.getAttribute("db");
            Pattern dbProductPattern = Pattern.compile(dbMatcher.getAttribute("databaseProductName"), Pattern.CASE_INSENSITIVE);

            // If the connection databaseProcuctName matches the pattern,
            // use the match name from this matcher.
            if (dbProductPattern.matcher(dbProductName).find()) {
                return dbMatchName;
            }
        }
        return null;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



