use of org.apache.tapestry5.internal.mongodb.MongoDBImpl in project tapestry-5 by apache.
the class MongodbModule method buildMongoDB.
@Scope(ScopeConstants.PERTHREAD)
public static MongoDB buildMongoDB(Logger logger, final MongoDBSource mongoDBSource, PerthreadManager perthreadManager, @Symbol(MongoDBSymbols.DEFAULT_DB_NAME) String defaultDbName, @Symbol(MongoDBSymbols.CONSISTENT_REQUEST) boolean consistentRequest, @Symbol(MongoDBSymbols.SECURE_MODE) boolean secureMode, @Symbol(MongoDBSymbols.DB_USERNAME) String dbUsername, @Symbol(MongoDBSymbols.DB_PASSWORD) String dbPassword) {
final MongoDBImpl mongoDB = new MongoDBImpl(logger, mongoDBSource, defaultDbName, consistentRequest, secureMode, dbUsername, dbPassword);
perthreadManager.addThreadCleanupListener(mongoDB);
return mongoDB;
}
Aggregations