Hello-java sample modified to have minor mongodb interactions