You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by al...@apache.org on 2014/07/14 00:38:03 UTC

svn commit: r1610313 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java

Author: allee8285
Date: Sun Jul 13 22:38:03 2014
New Revision: 1610313

URL: http://svn.apache.org/r1610313
Log:
OPENJPA-2516 - Aggregate connection property for Driver.connect

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java?rev=1610313&r1=1610312&r2=1610313&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java Sun Jul 13 22:38:03 2014
@@ -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());