Skip to content

Instantly share code, notes, and snippets.

@nparsons08 nparsons08/session.java Secret
Created Oct 14, 2019

Embed
What would you like to do?
try (ClientSession clientSession = client.startSession()) {
clientSession.startTransaction();
collection.insertOne(clientSession, docOne);
collection.insertOne(clientSession, docTwo);
clientSession.commitTransaction();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.