private static void saveAndGet() {
		try {
			// connect to mongoDB, ip and port number
			Mongo mongo = new Mongo("localhost", 27017);

			// get database from MongoDB,
			// if database doesn't exists, mongoDB will create it automatically
			DB db = mongo.getDB("paldb");

			// Get collection from MongoDB, database named "paldb"
			// if collection doesn't exists, mongoDB will create it
			// automatically
			DBCollection collection = db.getCollection("users");

			// create a document to store key and value
			BasicDBObject document = new BasicDBObject();
			document.put("id", 1001);
			document.put("msg", "hello world mongoDB in Java");

			// save it into collection named "users"
			collection.insert(document);

			// search query
			BasicDBObject searchQuery = new BasicDBObject();
			searchQuery.put("id", 1001);

			// query it
			DBCursor cursor = collection.find(searchQuery);

			// loop over the cursor and display the retrieved result
			while (cursor.hasNext()) {
				logger.debug("value from Mongodb:" + cursor.next());
			}

			logger.debug("Done");

		} catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (MongoException e) {
			e.printStackTrace();
		}

	}