Try it :-)
Then try running it twice in a JVM.
And then try TDB2 vs TDB1 vs TIM.
Andy
On 28/12/17 23:49, Claude Warren wrote:
Would the following code snippit work
Graph g = // a TDB graph instance
if (g.getTransactionHandler().transactionsSupported()) {
Graph initial = graphWith( GraphFactory.createGraphMem(),
"initial hasValue 42; also hasURI hello");
Graph extra = graphWith(GraphFactory.createGraphMem(),
"extra hasValue 17; also hasURI world");
GraphUtil.addInto(g, initial);
g.getTransactionHandler().begin();
GraphUtil.addInto(g, extra);
g.getTransactionHandler().abort();
assertIsomorphic(initial, g);
Notes:
graphWith populates the graph with the triples defined in the string.
GraphUtil.addInto() performs no transaction handling and copies the
contents of the second param into the first param.
I suspect that this will/should fail when the begin() is called as the
transaction as we are switching from not using transactions to using them.
Claude