openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r1610313 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java
Date Sun, 13 Jul 2014 22:38:03 GMT
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());



Mime
View raw message