openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r1178635 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java
Date Mon, 03 Oct 2011 23:24:20 GMT
Author: ppoddar
Date: Mon Oct  3 23:24:20 2011
New Revision: 1178635

URL: http://svn.apache.org/viewvc?rev=1178635&view=rev
Log:
useful error message for connection establishment problem

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.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=1178635&r1=1178634&r2=1178635&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
Mon Oct  3 23:24:20 2011
@@ -60,10 +60,8 @@ import org.apache.openjpa.util.UserExcep
  */
 public class DataSourceFactory {
 
-    private static final Localizer _loc = Localizer.forPackage
-    	 (DataSourceFactory.class);
-    protected static Localizer _eloc = 
-    	Localizer.forPackage(DelegatingDataSource.class);
+    private static final Localizer _loc = Localizer.forPackage(DataSourceFactory.class);
+    protected static Localizer _eloc = Localizer.forPackage(DelegatingDataSource.class);
 
     /**
      * Create a datasource using the given configuration.
@@ -73,7 +71,7 @@ public class DataSourceFactory {
         String driver = (factory2) ? conf.getConnection2DriverName()
             : conf.getConnectionDriverName();
         if (StringUtils.isEmpty(driver))
-            throw new UserException(_loc.get("no-driver", driver)).
+            throw new UserException(_loc.get("no-driver", conf)).
                 setFatal(true);
 
         ClassLoader loader = conf.getClassResolverInstance().



Mime
View raw message