Permalink
Browse files

... TDBFactory uses StoreConnection.make anyway

  • Loading branch information...
1 parent 948459b commit 0775b55a9577d3ae3a7f7352177d82dfdcc06c83 @castagna committed Mar 21, 2012
Showing with 3 additions and 12 deletions.
  1. +3 −12 src/main/java/dev/TestTDBCorruption.java
@@ -30,7 +30,7 @@
import com.hp.hpl.jena.query.ReadWrite;
import com.hp.hpl.jena.sparql.core.DatasetGraph;
import com.hp.hpl.jena.sparql.core.Quad;
-import com.hp.hpl.jena.tdb.StoreConnection;
+import com.hp.hpl.jena.tdb.TDBFactory;
import com.hp.hpl.jena.tdb.base.file.Location;
public class TestTDBCorruption {
@@ -41,17 +41,8 @@
@Test public void test() {
Location location = new Location ( path );
-
- //
- // This is wrong: if transaction are needed,
- // StoreConnection must be used instead of TDBFactory
- //
- // Dataset dataset = TDBFactory.createDataset ( location );
- // dataset.begin ( ReadWrite.WRITE );
- //
-
- StoreConnection sc = StoreConnection.make ( location );
- Dataset dataset = sc.begin ( ReadWrite.WRITE ).toDataset();
+ Dataset dataset = TDBFactory.createDataset ( location );
+ dataset.begin ( ReadWrite.WRITE );
try {
DatasetGraph dsg = dataset.asDatasetGraph();
DatasetGraph dsg2 = RiotLoader.datasetFromString ( str_triple, Lang.TURTLE, null );

0 comments on commit 0775b55

Please sign in to comment.