I am using neo4j along with other data sources (e.g., MySQL). I checked neo4j kernel source, although inside neo4j, neo4j storage and lucene index are wrapped as XA resource and managed by 2 phases commit, but this XA feature is not exposed to outside of neo4j.
Any idea of how to achieve 2 phases commit when using neo4j along with other data sources? What I am doing now is to modify neo4j source code mainly in
org.neo4j.kernel.TopLevelTransaction.java
org.neo4j.kernel.impl.transaction.TransactionImpl.java
org.neo4j.kernel.impl.transaction.TxManager.java
To break neo4j transaction commit into 2 phases and expose the function through TopLevelTransaction.
The problems of doing this:
Any better ideas?
--
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 neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Thanks MichaelPlease correct me if I am wrong.I assume it means the code managing the XA transactions need to be run in the same process with neo4j. In case I am using neo4j as an independent server, this code need to be inside neo4j unmanaged server extension. In this case I cannot add other computers to share the XA transaction management workload.More unfortunately, I am using SAP HANA, which doesn't seem to support XA transaction. Luckily there is only one XA incompatible data source in my system.So for me, it's better to expose the 2 phases commit function through rest API. Then I can1. Do the first phase commit at neo4j2. Commit to HANA3. Rollback or do the second commit at neo4j according to the result of step 2.