OPENJPA-2516 - Aggregate connection property for Driver.connect

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1610313 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Albert Lee 2014-07-13 22:38:03 +00:00
parent fc4e1e4f58
commit 3eaaa0c4b2
1 changed files with 8 additions and 1 deletions

View File

@ -81,7 +81,14 @@ public class SimpleDriverDataSource
}
protected Connection getSimpleConnection(Properties props) throws SQLException {
Connection con = getSimpleDriver().connect(_connectionURL, props == null? new Properties() : props);
Properties conProps = new Properties();
if (props != null) {
conProps.putAll(props);
}
if (_connectionProperties != null) {
conProps.putAll(_connectionProperties);
}
Connection con = getSimpleDriver().connect(_connectionURL, conProps);
if (con == null) {
throw new SQLException(_eloc.get("poolds-null",
_connectionDriverName, _connectionURL).getMessage());