I have a Neo4j Database with some graph created. I want to execute a set of cypher statements against this database from a java micro service. Two transactions are required to write data. If second transaction is failing, I want to revert the first transaction. There seems no way to revert a previously committed transaction.
In order to solve this problem , I am thinking to load the current session to am Embedded Neo4j database and execute both transactions. Only if both transactions are successful, I will try to run against the real database.
Is it possible to create Embedded Database from a session( so that the graph in session is replicated to Embedded Server). Is there any other way to solve this problem?