session

val session: ClientSession

Access the current MongoDB ClientSession from the transaction context. Can be used inside a method annotated with @Transactional to manually access the client session.

Return

ClientSession or null if not in the context of a transaction.