Examples of CannotGetMongoDbConnectionException


Examples of org.springframework.data.mongodb.CannotGetMongoDbConnectionException

      mongoOptions = new MongoOptions();
    }

    if (!isNullOrEmpty(replicaPair)) {
      if (replicaPair.size() < 2) {
        throw new CannotGetMongoDbConnectionException("A replica pair must have two server entries");
      }
      mongo = new Mongo(replicaPair.get(0), replicaPair.get(1), mongoOptions);
    } else if (!isNullOrEmpty(replicaSetSeeds)) {
      mongo = new Mongo(replicaSetSeeds, mongoOptions);
    } else {
View Full Code Here

Examples of org.springframework.data.mongodb.CannotGetMongoDbConnectionException

        String username = credentials.getUsername();
        String password = credentials.hasPassword() ? credentials.getPassword() : null;

        if (!authDb.authenticate(username, password == null ? null : password.toCharArray())) {
          throw new CannotGetMongoDbConnectionException("Failed to authenticate to database [" + databaseName + "], "
              + credentials.toString(), databaseName, credentials);
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.