openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: svn commit: r956705 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Date Tue, 22 Jun 2010 14:52:11 GMT

@@ -4621,7 +4621,7 @@ public class DBDictionary
         // initialize the error codes
         SQLErrorCodeReader codeReader = new SQLErrorCodeReader();
         String rsrc = "sql-error-state-codes.xml";
-        InputStream stream = getClass().getResourceAsStream(rsrc);
+        InputStream stream = DBDictionary.class.getResourceAsStream(rsrc);
         String dictionaryClassName = getClass().getName();
         if (stream == null) { // User supplied dictionary but no error
codes xml
             // use default 


It is likely that a user-defined database dictionary (which is not an
extension but a new database type or somethiig) will carry its own error
code. So first attempt to load that resource (sql-error-state-codes.xml), if
none present, then load the default resource that is pre-packaged with
OpenJPA libarray relative to DBDictionary.class.

-----
Pinaki 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Re-svn-commit-r956705-openjpa-trunk-openjpa-jdbc-src-main-java-org-apache-openjpa-jdbc-sql-DBDictiona-tp5209003p5209144.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Mime
View raw message