use of org.eclipse.rdf4j.repository.sparql.query.SPARQLUpdate in project rdf4j by eclipse.
the class SPARQLConnection method commit.
public void commit() throws RepositoryException {
synchronized (transactionLock) {
if (isActive()) {
synchronized (transactionLock) {
SPARQLUpdate transaction = new SPARQLUpdate(client, null, sparqlTransaction.toString());
try {
transaction.execute();
} catch (UpdateExecutionException e) {
throw new RepositoryException("error executing transaction", e);
}
sparqlTransaction = null;
}
} else {
throw new RepositoryException("no transaction active.");
}
}
}
Aggregations