dbName = getOptionalStringConfig("db_name", "default_db");
username = getOptionalStringConfig("username", null);
password = getOptionalStringConfig("password", null);
try {
mongo = new Mongo(host, port);
db = mongo.getDB(dbName);
if (username != null && password != null) {
db.authenticate(username, password.toCharArray());
}
eb.registerHandler(address, this);