org.apache.tinkerpop.gremlin.structure.util.TransactionException Java Examples
The following examples show how to use
org.apache.tinkerpop.gremlin.structure.util.TransactionException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Neo4JGraph.java From neo4j-gremlin-bolt with Apache License 2.0 | 5 votes |
@Override protected void doCommit() throws TransactionException { // current session Neo4JSession session = Neo4JGraph.this.currentSession(); // commit transaction session.commit(); }
Example #2
Source File: Neo4JGraph.java From neo4j-gremlin-bolt with Apache License 2.0 | 5 votes |
@Override protected void doRollback() throws TransactionException { // current session Neo4JSession session = Neo4JGraph.this.currentSession(); // rollback transaction session.rollback(); }
Example #3
Source File: Neo4jGraph.java From tinkerpop with Apache License 2.0 | 5 votes |
@Override public void doCommit() throws TransactionException { try (Neo4jTx tx = threadLocalTx.get()) { tx.success(); } catch (Exception ex) { throw new TransactionException(ex); } finally { threadLocalTx.remove(); } }
Example #4
Source File: Neo4jGraph.java From tinkerpop with Apache License 2.0 | 5 votes |
@Override public void doRollback() throws TransactionException { try (Neo4jTx tx = threadLocalTx.get()) { tx.failure(); } catch (Exception e) { throw new TransactionException(e); } finally { threadLocalTx.remove(); } }