I am using a NoSQL database MongoDB with Java and Spring Data. I am aware that MongoDB only supports transactions for a single document.
I am using Spring Transacti
MongoDB doesn't support transactions, it only supports atomic operations.
http://docs.mongodb.org/manual/tutorial/model-data-for-atomic-operations/
Here is a post from someone who implemented transactions for MongoDB with optimistic locking: https://stackoverflow.com/a/12757751/1173560
MongoDB does support transaction-like semantics using two-phase commits.
There is also another independent effort to support transactions in mongodb using optimistic locking.
Multi-document ACID transactions are now supported in MongoDB 4.0! See https://www.mongodb.com/blog/post/mongodb-multi-document-acid-transactions-general-availability