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
-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Reply via email to