Are Spring Data MongoDB connection streams tied?

We are evaluating TokuMX so that we can use its ACID transaction feature, but we want to use it with Spring Data for MongoDB.

So here's the question: Are MongoDB connections tied to Spring data flow so we can take advantage of TokuMX's transaction implementation?

+3


source to share


1 answer


According to this:

http://docs.mongodb.org/ecosystem/drivers/java-concurrency/#java-driver-concurrency

It looks like connections are being pulled from the internal connection pool and returned "per request" so the database connection is not thread-specific.

I haven't found a way to override this yet. Perhaps there is another driver, or a setting that I haven't found yet.



Edit: Apparently I haven't read the article enough. You should be able to use db.requestStart () to make sure the connection is maintained for the stream.

There are similar mentions here for C # and Python:

http://docs.tokutek.com/tokumx/tokumx-transactions.html#tokumx-transactions-multi-statement-drivers

0


source







All Articles