Search in sources :

Example 1 with MongoDBImpl

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;
}
Also used : MongoDBImpl(org.apache.tapestry5.internal.mongodb.MongoDBImpl) Scope(org.apache.tapestry5.ioc.annotations.Scope)

Aggregations

MongoDBImpl (org.apache.tapestry5.internal.mongodb.MongoDBImpl)1 Scope (org.apache.tapestry5.ioc.annotations.Scope)1