public void close() throws IOException { if (dataStore != null) { // clean up dataStore.closeSafe(rs); dataStore.closeSafe(st); dataStore.releaseConnection(cx, featureSource.getState()); } cleanup(); }
public void close() throws IOException { FeatureReader r = reader; while (r instanceof DelegatingFeatureReader) { if (r instanceof JDBCFeatureReader) { break; } r = ((DelegatingFeatureReader) r).getDelegate(); } if (r instanceof JDBCFeatureReader) { JDBCFeatureReader jdbcReader = (JDBCFeatureReader) r; JDBCFeatureSource fs = jdbcReader.featureSource; Connection cx = jdbcReader.cx; try { reader.close(); } finally { fs.getDataStore().releaseConnection(cx, fs.getState()); } } } }
public void close() throws IOException { FeatureWriter w = writer; while (w instanceof DelegatingFeatureWriter) { if (w instanceof JDBCFeatureReader) { break; } w = ((DelegatingFeatureWriter) w).getDelegate(); } if (w instanceof JDBCFeatureReader) { JDBCFeatureReader jdbcReader = (JDBCFeatureReader) w; JDBCFeatureSource fs = jdbcReader.featureSource; Connection cx = jdbcReader.cx; try { writer.close(); } finally { fs.getDataStore().releaseConnection(cx, fs.getState()); } } } }
@Override protected boolean handleVisitor(Query query, FeatureVisitor visitor) throws IOException { // special case for nearest visit, it's the sum of two other visits if (visitor instanceof NearestVisitor) { return handleNearestVisitor(query, visitor); } else { // grab connection using the current transaction Connection cx = getDataStore().getConnection(getState()); try { Object result = getDataStore().getAggregateValue(visitor, getSchema(), query, cx); return result != null; } finally { // release the connection - behaviour depends on Transaction.AUTO_COMMIT getDataStore().releaseConnection(cx, getState()); } } }
dataStore.releaseConnection(cx, getState());
return dataStore.getBounds(getSchema(), q, cx); } finally { getDataStore().releaseConnection(cx, getState());
throw (IOException) new IOException(msg).initCause(e); } finally { getDataStore().releaseConnection(cx, state);
public void close() throws IOException { if ( dataStore != null ) { //clean up dataStore.closeSafe( rs ); dataStore.closeSafe( st ); dataStore.releaseConnection(cx, featureSource.getState() ); } else { //means we are already closed... should we throw an exception? } cleanup(); }
public void close() throws IOException { if ( dataStore != null ) { //clean up dataStore.closeSafe( rs ); dataStore.closeSafe( st ); dataStore.releaseConnection(cx, featureSource.getState() ); } else { //means we are already closed... should we throw an exception? } cleanup(); }
public void close() throws IOException { FeatureReader r = reader; while( r instanceof DelegatingFeatureReader ) { if ( r instanceof JDBCFeatureReader ) { break; } r = ((DelegatingFeatureReader)r).getDelegate(); } if ( r instanceof JDBCFeatureReader ) { JDBCFeatureReader jdbcReader = (JDBCFeatureReader) r; JDBCFeatureSource fs = jdbcReader.featureSource; Connection cx = jdbcReader.cx; try { reader.close(); } finally { fs.getDataStore().releaseConnection( cx, fs.getState() ); } } } }
public void close() throws IOException { FeatureWriter w = writer; while( w instanceof DelegatingFeatureWriter ) { if ( w instanceof JDBCFeatureReader ) { break; } w = ((DelegatingFeatureWriter)w).getDelegate(); } if ( w instanceof JDBCFeatureReader ) { JDBCFeatureReader jdbcReader = (JDBCFeatureReader) w; JDBCFeatureSource fs = jdbcReader.featureSource; Connection cx = jdbcReader.cx; try { writer.close(); } finally { fs.getDataStore().releaseConnection( cx, fs.getState() ); } } } }
public void close() throws IOException { FeatureWriter w = writer; while( w instanceof DelegatingFeatureWriter ) { if ( w instanceof JDBCFeatureReader ) { break; } w = ((DelegatingFeatureWriter)w).getDelegate(); } if ( w instanceof JDBCFeatureReader ) { JDBCFeatureReader jdbcReader = (JDBCFeatureReader) w; JDBCFeatureSource fs = jdbcReader.featureSource; Connection cx = jdbcReader.cx; try { writer.close(); } finally { fs.getDataStore().releaseConnection( cx, fs.getState() ); } } } }
public void close() throws IOException { FeatureReader r = reader; while( r instanceof DelegatingFeatureReader ) { if ( r instanceof JDBCFeatureReader ) { break; } r = ((DelegatingFeatureReader)r).getDelegate(); } if ( r instanceof JDBCFeatureReader ) { JDBCFeatureReader jdbcReader = (JDBCFeatureReader) r; JDBCFeatureSource fs = jdbcReader.featureSource; Connection cx = jdbcReader.cx; try { reader.close(); } finally { fs.getDataStore().releaseConnection( cx, fs.getState() ); } } } }
@Override protected boolean handleVisitor(Query query, FeatureVisitor visitor) throws IOException { // grab connection using the current transaction Connection cx = getDataStore().getConnection(getState()); try { Object result = getDataStore().getAggregateValue(visitor, getSchema(), query, cx); return result != null; } finally { // release the connection - behaviour depends on Transaction.AUTO_COMMIT getDataStore().releaseConnection(cx, getState()); } }
getDataStore().releaseConnection( cx, getState() );
dataStore.releaseConnection(cx, getState());
dataStore.releaseConnection(cx, getState());
getDataStore().releaseConnection( cx, getState() );
getDataStore().releaseConnection( cx, getState() );
throw (IOException) new IOException(msg).initCause(e); } finally { getDataStore().releaseConnection( cx, state );