Java Code Examples for com.mongodb.DB.command()

The following are Jave code examples for showing how to use command() of the com.mongodb.DB class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: mongodb-broker   File:   View Source Code Vote up 5 votes
public void deleteUser(String database, String username) throws MongoServiceException {
	try {
		DB db = client.getDB(database);
		db.command(new BasicDBObject("dropUser", username));
	} catch (MongoException e) {
		throw handleException(e);