Does it auto fail? Considering how I see in the examples, it does auto-fail... if it doesn't then maybe the doc for tx.finish() should specify what happens, or even throw ? if there isn't a specified default. Ah, I just read the javadoc for Transaction (interface): " If an exception is raised in the try-block, success()<eclipse-javadoc:%E2%98%82=neo4j-community/kernel%5C/src%5C/main%5C/java%3Corg.neo4j.graphdb%7BTransaction.java%E2%98%83Transaction%E2%98%82%E2%98%82success%E2%98%82>will never be invoked and the internal state of the transaction object will cause finish()<eclipse-javadoc:%E2%98%82=neo4j-community/kernel%5C/src%5C/main%5C/java%3Corg.neo4j.graphdb%7BTransaction.java%E2%98%83Transaction%E2%98%82%E2%98%82finish%E2%98%82>to roll back the transaction. This is very important: unless success()<eclipse-javadoc:%E2%98%82=neo4j-community/kernel%5C/src%5C/main%5C/java%3Corg.neo4j.graphdb%7BTransaction.java%E2%98%83Transaction%E2%98%82%E2%98%82success%E2%98%82>is invoked, the transaction will fail upon finish()<eclipse-javadoc:%E2%98%82=neo4j-community/kernel%5C/src%5C/main%5C/java%3Corg.neo4j.graphdb%7BTransaction.java%E2%98%83Transaction%E2%98%82%E2%98%82finish%E2%98%82>. A transaction can be explicitly marked for rollback by invoking the failure()<eclipse-javadoc:%E2%98%82=neo4j-community/kernel%5C/src%5C/main%5C/java%3Corg.neo4j.graphdb%7BTransaction.java%E2%98%83Transaction%E2%98%82%E2%98%82failure%E2%98%82>method. " In this case, could some developer please update the tx.finish() javadoc to state that? it currently states this: "Commits or marks this transaction for rollback, depending on whether success()<eclipse-javadoc:%E2%98%82=neo4j-community/kernel%5C/src%5C/main%5C/java%3Corg.neo4j.graphdb%7BTransaction.java%E2%98%83Transaction%7Efinish%E2%98%82%E2%98%82success%E2%98%82>or failure()<eclipse-javadoc:%E2%98%82=neo4j-community/kernel%5C/src%5C/main%5C/java%3Corg.neo4j.graphdb%7BTransaction.java%E2%98%83Transaction%7Efinish%E2%98%82%E2%98%82failure%E2%98%82>has been previously invoked."
For some reason, this isn't clear to me that it defaults to failure() unless success() is invoked Thanks! _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user