The following code newly begins transaction each 1000 batch job.

Is the following code correct?

Do I have to invoke the tx.close() method each 1000 batch job in the middle?

It seems there's no problem without calling the method.

What are success() and close() for? It's confusing.

Transaction tx = mGraphDb.beginTx();

int count = 0;

try
{
    if(count % 1000 == 0)
    {
        tx.success();
        tx.close(); // should this be called?
        tx = mGraphDb.beginTx();
    }

    count++;
            
    tx.success();
} finally {
    tx.close();
}


-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to