openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hthom...@apache.org
Subject svn commit: r1431723 - /openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Date Thu, 10 Jan 2013 23:16:55 GMT
Author: hthomann
Date: Thu Jan 10 23:16:55 2013
New Revision: 1431723

URL: http://svn.apache.org/viewvc?rev=1431723&view=rev
Log:
OPENJPA-2236: Put try/catch around connection info trace in DBDictionary - back ported Jeremy
Bauer's trunk changes to 2.0.x.

Modified:
    openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java

Modified: openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=1431723&r1=1431722&r2=1431723&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Thu Jan 10 23:16:55 2013
@@ -445,10 +445,15 @@ public class DBDictionary
             if (log.isTraceEnabled()) {                    
                 log.trace(DBDictionaryFactory.toString(metaData));
 
-                if (isJDBC3)
-                    log.trace(_loc.get("connection-defaults", new Object[]{
-                        conn.getAutoCommit(), conn.getHoldability(),
-                        conn.getTransactionIsolation()}));
+                if (isJDBC3) {
+                    try {
+                        log.trace(_loc.get("connection-defaults", new Object[]{
+                            conn.getAutoCommit(), conn.getHoldability(),
+                            conn.getTransactionIsolation()}));
+                    } catch (Throwable t) {
+                        log.trace("Unable to trace connection settings", t);
+                    }
+                }
             }
             
             // Configure the naming utility



Mime
View raw message