if (results.next()) {
docToReturn = results.getString(returnedRow);
}
return docToReturn;
} catch (SQLException e) {
throw new XregistryException(e);
} finally {
try {
results.close();
statement.close();
connection.setAutoCommit(true);
globalContext.closeConnection(connection);
} catch (SQLException e) {
throw new XregistryException(e);
}
}
}