Skip to content

Instantly share code, notes, and snippets.

@JanPaulEttles
Created December 8, 2011 15:14
Show Gist options
  • Select an option

  • Save JanPaulEttles/1447247 to your computer and use it in GitHub Desktop.

Select an option

Save JanPaulEttles/1447247 to your computer and use it in GitHub Desktop.
tomcat and mongo #3
try {
mongoService = new MongoService();
db = mongoService.getDb("myDB");
boolean authenticated = db.authenticate(ContextUtil.getEntryAsString("mongo.myDB.username"), ContextUtil.getEntryAsString("mongo.myDB.password").toCharArray());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment