openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r676081 - in /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema: DataSourceFactory.java SimpleDriverDataSource.java
Date Fri, 11 Jul 2008 21:14:42 GMT
Author: ppoddar
Date: Fri Jul 11 14:14:42 2008
New Revision: 676081

URL: http://svn.apache.org/viewvc?rev=676081&view=rev
Log:
OPENJPA-656: reusing existing error message key from a different package

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java
    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/DataSourceFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java?rev=676081&r1=676080&r2=676081&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java
Fri Jul 11 14:14:42 2008
@@ -60,6 +60,8 @@
 
     private static final Localizer _loc = Localizer.forPackage
     	 (DataSourceFactory.class);
+    protected static Localizer _eloc = 
+    	Localizer.forPackage(DelegatingDataSource.class);
 
     /**
      * Create a datasource using the given configuration.
@@ -251,13 +253,11 @@
     
     static OpenJPAException newConnectException(JDBCConfiguration conf, 
     		boolean factory2, Exception cause) {
-    	return new UserException(_loc.get("conn-failed", factory2 
+    	return new UserException(_eloc.get("poolds-null", factory2 
           	  ? new Object[]{conf.getConnection2DriverName(), 
-          			         conf.getConnection2URL(), 
-          			         conf.getConnection2Properties()}
+          			         conf.getConnection2URL()}
           	  : new Object[]{conf.getConnectionDriverName(),
-          		             conf.getConnectionURL(), 
-          		             conf.getConnectionProperties()}),
+          		             conf.getConnectionURL()}),
           		             cause).setFatal(true);
     }
 

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=676081&r1=676080&r2=676081&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
Fri Jul 11 14:14:42 2008
@@ -29,6 +29,7 @@
 import java.util.Properties;
 
 import org.apache.openjpa.jdbc.sql.DBDictionary;
+import org.apache.openjpa.lib.jdbc.DelegatingDataSource;
 import org.apache.openjpa.lib.util.J2DoPrivHelper;
 import org.apache.openjpa.lib.util.Localizer;
 import org.apache.openjpa.util.StoreException;
@@ -51,6 +52,8 @@
     
     protected static Localizer _loc = 
     	Localizer.forPackage(SimpleDriverDataSource.class);
+    protected static Localizer _eloc = 
+    	Localizer.forPackage(DelegatingDataSource.class);
 
     public Connection getConnection()
         throws SQLException {
@@ -77,8 +80,8 @@
         throws SQLException {
     	Connection con = getDriver().connect(_connectionURL, props);
     	if (con == null) {
-        	throw new SQLException(_loc.get("conn-failed",
-        			_connectionDriverName, _connectionURL, props).getMessage());
+        	throw new SQLException(_eloc.get("poolds-null",
+        			_connectionDriverName, _connectionURL).getMessage());
         }
         return con;
     }



Mime
View raw message