Strabon
changeset 94:807b8e831226
Remove the statement for closing the connection that is not created because of changeset 79
author | George Garbis <ggarbis@di.uoa.gr> |
---|---|
date | Thu Apr 05 12:43:45 2012 +0300 (2012-04-05) |
parents | cd9be1ed7ba4 |
children | 31fea69dccba |
files | generaldb/src/main/java/org/openrdf/sail/generaldb/GeneralDBTripleRepository.java monetdb/src/main/java/org/openrdf/sail/monetdb/MonetDBTripleRepository.java postgis/src/main/java/org/openrdf/sail/postgis/PostGISTripleRepository.java |
line diff
1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/GeneralDBTripleRepository.java Wed Apr 04 19:06:16 2012 +0300 1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/GeneralDBTripleRepository.java Thu Apr 05 12:43:45 2012 +0300 1.3 @@ -156,17 +156,8 @@ 1.4 conn.setAutoCommit(false); 1.5 } 1.6 1.7 - public synchronized void close() 1.8 - throws SQLException 1.9 - { 1.10 - manager.close(); 1.11 - if (!conn.getAutoCommit()) { 1.12 - conn.rollback(); 1.13 - } 1.14 - conn.setAutoCommit(true); 1.15 - conn.close(); 1.16 - releaseLock(); 1.17 - } 1.18 + abstract public void close() 1.19 + throws SQLException; 1.20 1.21 public synchronized void commit() 1.22 throws SQLException, RdbmsException, InterruptedException
2.1 --- a/monetdb/src/main/java/org/openrdf/sail/monetdb/MonetDBTripleRepository.java Wed Apr 04 19:06:16 2012 +0300 2.2 +++ b/monetdb/src/main/java/org/openrdf/sail/monetdb/MonetDBTripleRepository.java Thu Apr 05 12:43:45 2012 +0300 2.3 @@ -147,4 +147,24 @@ 2.4 // } 2.5 // return sb.toString(); 2.6 // } 2.7 + 2.8 + @Override 2.9 + public synchronized void close() 2.10 + throws SQLException 2.11 + { 2.12 + manager.close(); 2.13 + if (!conn.getAutoCommit()) { 2.14 + conn.rollback(); 2.15 + } 2.16 + 2.17 + /** 2.18 + * In MonetDBConnectionFactory.createConnection() 2.19 + * instead of creating a new connection (<db>) the connection <nsAndTableIndexes> is shared. 2.20 + * Here the <db> connection would be closed. This should not be done because it 2.21 + * would cause <nsAndTableIndexes> to close too. 2.22 + * */ 2.23 +// conn.setAutoCommit(true); 2.24 +// conn.close(); 2.25 + releaseLock(); 2.26 + } 2.27 }
3.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/PostGISTripleRepository.java Wed Apr 04 19:06:16 2012 +0300 3.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/PostGISTripleRepository.java Thu Apr 05 12:43:45 2012 +0300 3.3 @@ -110,4 +110,17 @@ 3.4 } 3.5 return sb.toString(); 3.6 } 3.7 + 3.8 + @Override 3.9 + public synchronized void close() 3.10 + throws SQLException 3.11 + { 3.12 + manager.close(); 3.13 + if (!conn.getAutoCommit()) { 3.14 + conn.rollback(); 3.15 + } 3.16 + conn.setAutoCommit(true); 3.17 + conn.close(); 3.18 + releaseLock(); 3.19 + } 3.20 }