public PutOutcome put(final K key,
                          final V value,
                          final boolean overwriteExisting,
                          final boolean isAppending) {
        return lmdbEnvironment.getWithWriteTxn(writeTxn -> {
            try {
                final PutOutcome putOutcome = put(writeTxn, key, value, overwriteExisting, isAppending);
                return putOutcome;
            } catch (RuntimeException e) {
                throw new RuntimeException(LogUtil.message("Error putting key {}, value {}", key, value), e);
            }
        });
    }
This will fail if you are already inside a txn.
stroom-lmdb/src/main/java/stroom/lmdb/AbstractLmdbDb.java