use of org.apache.jena.tdb.StoreConnection in project jena by apache.
the class AbstractStoreConnections method store_3.
@Test(expected = TDBTransactionException.class)
public void store_3() {
// Expel.
StoreConnection sConn = getStoreConnection();
DatasetGraphTxn dsgR1 = sConn.begin(ReadWrite.WRITE);
StoreConnection.release(sConn.getLocation());
}
use of org.apache.jena.tdb.StoreConnection in project jena by apache.
the class AbstractStoreConnections method store_5.
@Test
public void store_5() {
// No transaction. Make sure StoreConnection.release cleans up OK.
StoreConnection sConn = getStoreConnection();
Location loc = sConn.getLocation();
DatasetGraph dsg = sConn.getBaseDataset();
dsg.add(q);
assertTrue(dsg.contains(q));
StoreConnection.release(loc);
sConn = StoreConnection.make(loc);
dsg = sConn.getBaseDataset();
assertTrue(dsg.contains(q));
}
use of org.apache.jena.tdb.StoreConnection in project jena by apache.
the class AbstractStoreConnections method store_1.
@Test
public void store_1() {
// Expel.
StoreConnection sConn = getStoreConnection();
DatasetGraphTxn dsgR1 = sConn.begin(ReadWrite.READ);
DatasetGraphTxn dsgW1 = sConn.begin(ReadWrite.WRITE);
dsgW1.add(q1);
dsgW1.commit();
dsgW1.end();
dsgR1.end();
assertTrue(sConn.isValid());
StoreConnection.release(sConn.getLocation());
assertFalse(sConn.isValid());
sConn = null;
StoreConnection sConn2 = getStoreConnection();
assertTrue(sConn2.isValid());
}
use of org.apache.jena.tdb.StoreConnection in project jena by apache.
the class TestTransRestart method setupTxn.
private void setupTxn() {
StoreConnection.release(location);
FileOps.clearDirectory(path);
StoreConnection sc = StoreConnection.make(location);
DatasetGraphTxn dsg = sc.begin(ReadWrite.WRITE);
dsg.add(quad1);
dsg.commit();
dsg.end();
sc.flush();
StoreConnection.release(location);
}
use of org.apache.jena.tdb.StoreConnection in project jena by apache.
the class AbstractTestTransSeq method trans_01.
// Basics.
@Test
public void trans_01() {
StoreConnection sConn = getStoreConnection();
DatasetGraphTxn dsg = sConn.begin(ReadWrite.READ);
dsg.end();
}
Aggregations