You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Stuart Friedberg (JIRA)" <ib...@incubator.apache.org> on 2007/02/28 09:17:05 UTC

[jira] Created: (IBATIS-399) Properties in SqlMapConfigParser.parse should override sqlMapConfig properties XML

Properties in SqlMapConfigParser.parse should override sqlMapConfig properties XML
----------------------------------------------------------------------------------

                 Key: IBATIS-399
                 URL: https://issues.apache.org/jira/browse/IBATIS-399
             Project: iBatis for Java
          Issue Type: Improvement
          Components: Documentation, SQL Maps
    Affects Versions: 2.3.0
            Reporter: Stuart Friedberg


Currently, any properties provided through the (optional) XML sqlMapConfig properties element
override any conflict with those provided through SqlMapConfigParser.parse(Reader, Properties).
It would be much more useful if the (currently undocumented) precedence were reversed, and
documented.  With this change, the XML properties element could be used to provide defaults
(appropriate for a mostly static configuration file) while still allowing an application to make
run-time changes.  Example: database URL, driver, username and password.

This change (not counting the documentation) could be effected by changing this line
in SqlMapConfigParser.addGlobalPropNodelets():
    props.putAll(vars.properties);
to these:
    vars.properties.putAll(props);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.