openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r1092309 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
Date Thu, 14 Apr 2011 14:52:20 GMT
Author: mikedd
Date: Thu Apr 14 14:52:20 2011
New Revision: 1092309

URL: http://svn.apache.org/viewvc?rev=1092309&view=rev
Log:
OPENJPA-1981: check whether connection is open before calling close

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java?rev=1092309&r1=1092308&r2=1092309&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
Thu Apr 14 14:52:20 2011
@@ -1068,8 +1068,10 @@ public class SchemaGenerator {
     }
 
     private void closeConn() throws SQLException {
-        if (_conn != null) {
-            _conn.close();
+        if (_conn != null ) {
+            if(! _conn.isClosed()) {
+                _conn.close();
+            }
         }
     }
 }



Mime
View raw message