@Override
            public void accept(final Transaction transaction) {
                if (transaction.isOpen()) throw Exceptions.openTransactionsOnClose();
            }
Throw an exception if the current transaction is open when {@link #close()} is called.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Transaction.java