jena-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Brenninkmeijer <>
Subject Unexpected requirement to call DatasetGraphTDB.finishRequest
Date Mon, 07 Feb 2011 14:28:32 GMT

I noticed (the hard way) that
DatasetGraphTDB.close() does not call DatasetGraphTDB.finishRequest() 
before closing the graph.
This then causes a NoSuchElementException when the dataset is later used.

I loaded a graph from rdf using TDBLoader.loadGraph
I added the graph to the dataset using addGraph

I queried the dataset with success. Closing the query.

I closed the dataset and then reopened it.
Exact same query with the exact same code failed.

I then added DatasetGraphTDB.finishRequest()before closing the dataset 
and it worked.

How I agree calling finishRequest() is good programing style and I 
should have done that.

However writing close() expecting a user to have called finishRequest() 
is poor style.

Christian Brenninkmeijer
Department of Computer Science
University of Manchester

View raw message