Sample use of java with mongoDB database.