jo4neo and transactions

5 views
Skip to first unread message

Stefan Berndt

unread,
Jun 30, 2010, 6:28:28 AM6/30/10
to jo4neo
Hey,

every access to the graph has to be transactional in neo4j. With
jo4neo i don't have to write transactional context into my source
code.
but when a transaction is started, when it is marked as successful or
failure and when it is finished?
Thx for your help

Best Regards,

Stefan

Taylor Cowan

unread,
Jun 30, 2010, 8:18:57 AM6/30/10
to jo4...@googlegroups.com
I recommend that you do use transactions, so that you are in control
and it's transparent, however, jo4neo will start one if it isn't
already in the context of an existing transaction.

That's one of the aspects of neo4j that I admire, if there is already
an active transaction starting a new one is a no-op. I think they
call it a "placebo" transaction.

In jo4neo transactions are applied at the method level of the
ObjectGraph. If you call graph.persist(), all updates to the graph
that occur within that call are wrapped in one transaction.

Taylor

Reply all
Reply to author
Forward
0 new messages