openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r781826 - in /openjpa/trunk/openjpa-jdbc/src/main: java/org/apache/openjpa/jdbc/schema/ForeignKey.java java/org/apache/openjpa/jdbc/sql/DBDictionary.java resources/org/apache/openjpa/jdbc/schema/localizer.properties
Date Thu, 04 Jun 2009 18:33:32 GMT
Author: mikedd
Date: Thu Jun  4 18:33:32 2009
New Revision: 781826

URL: http://svn.apache.org/viewvc?rev=781826&view=rev
Log:
OPENJPA-1083 Adding trace message

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/schema/localizer.properties

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java?rev=781826&r1=781825&r2=781826&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
Thu Jun  4 18:33:32 2009
@@ -18,18 +18,19 @@
  */
 package org.apache.openjpa.jdbc.schema;
 
-import java.sql.DatabaseMetaData;
 import java.sql.Connection;
+import java.sql.DatabaseMetaData;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 import java.util.LinkedHashMap;
+import java.util.List;
 
 import org.apache.commons.lang.ObjectUtils;
+import org.apache.openjpa.jdbc.sql.DBDictionary;
+import org.apache.openjpa.lib.log.Log;
 import org.apache.openjpa.lib.util.Localizer;
 import org.apache.openjpa.lib.util.StringDistance;
 import org.apache.openjpa.util.InvalidStateException;
-import org.apache.openjpa.jdbc.sql.DBDictionary;
 
 /**
  * Represents a database foreign key; may be a logical key with no
@@ -782,7 +783,10 @@
                     localtable.removeForeignKey(fkTemp);
             }
         } catch(Exception ex){
-            // TO DO  -- It would be nice to log a warning here.
+            Log log = dbdict.getLog();
+            if (log.isTraceEnabled()) {
+                log.trace(_loc.get("except-read-fk-name"), ex);
+            }
         }
         return retVal;
     }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=781826&r1=781825&r2=781826&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Thu Jun  4 18:33:32 2009
@@ -5020,4 +5020,8 @@
         
         return combined;
     }
+    
+    public Log getLog() { 
+        return log;
+    }
 }

Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/schema/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/schema/localizer.properties?rev=781826&r1=781825&r2=781826&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/schema/localizer.properties
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/schema/localizer.properties
Thu Jun  4 18:33:32 2009
@@ -152,3 +152,5 @@
 	and connection properties "{2}" are correct. See the nested exception for \
 	further details.
 no-column: Can not find column "{0}" in table "{1}"
+except-read-fk-name: An exception occurred when obtaining the foreign key \
+    names from the database.  



Mime
View raw message