fixed bug where we were referencing the null dbHolder instead of the instantiated one

This commit is contained in:
Graeme Rocher
2010-11-09 15:32:09 +01:00
parent fb42907fb8
commit 0a9d3973f9

View File

@@ -115,7 +115,7 @@ public class MongoDbUtils {
else {
holderToUse.addDB(db);
}
TransactionSynchronizationManager.registerSynchronization(new MongoSynchronization(dbHolder, mongo));
TransactionSynchronizationManager.registerSynchronization(new MongoSynchronization(holderToUse, mongo));
holderToUse.setSynchronizedWithTransaction(true);
if (holderToUse != dbHolder) {
TransactionSynchronizationManager.bindResource(mongo, holderToUse);