You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2012/08/29 11:49:07 UTC
[jira] [Closed] (JENA-307) QueryExecution is not being closed in
SPARQL_Query.execute method.
[ https://issues.apache.org/jira/browse/JENA-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Seaborne closed JENA-307.
------------------------------
> QueryExecution is not being closed in SPARQL_Query.execute method.
> -------------------------------------------------------------------
>
> Key: JENA-307
> URL: https://issues.apache.org/jira/browse/JENA-307
> Project: Apache Jena
> Issue Type: Question
> Components: Fuseki
> Affects Versions: Fuseki 0.2.4
> Reporter: Priyaranjan
> Assignee: Andy Seaborne
> Fix For: Fuseki 0.2.5
>
>
> QueryExecution is not being closed in SPARQL_Query.execute method.
> In the execute method , after sending the results , only the dataset.end() method is called to end the transation. But the QueryExecution that
> was created is never closed.
> This is in contrary to the examples provided at http://jena.apache.org/documentation/tdb/tdb_transactions.html for Read Transcations ,
> where the qExec.close is called before calling dataset.end
> Location location = ... ;
> Dataset dataset = ... ;
> dataset.begin(ReadWrite.READ) ;
> try {
> QueryExecution qExec = QueryExecutionFactory.create("SELECT * {?s ?p ?o} LIMIT 10", dataset) ;
> ResultSet rs = qExec.execSelect() ;
> try {
> ResultSetFormatter.out(rs) ;
> } finally { qExec.close() ; }
> // Another query - same view of the data.
> qExec = QueryExecutionFactory.create("SELECT * {?s ?p ?o} OFFSET 10 LIMIT 10", dataset) ;
> rs = qExec.execSelect() ;
> try {
> ResultSetFormatter.out(rs) ;
> } finally { qExec.close() ; }
> } finally { dataset.end() ; }
> Is this a bug in Fuseki ?
> In my application , I am creating a database connection , when the QueryExecution is created , and I need to close the connection when
> the QueryExecution is closed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira