Document that MongoClient doesn't throw an exception on connection failure

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.10.1
    • Component/s: Documentation
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When creating a new MongoClient instance with valid host/port parameters, but no MongoDB running there, I would expect a MongoException to be thrown. This is not the case. I can even use the MongoClient instance to get a DB instance via getDB() and subsequently a collection instance via getCollection(), again without being actually connected and any exception. I also tried getConnector().isOpen() to verify whether the connection was established and it returned true, without a running server. The latter issue might be me misinterpreting the API though.

      Others (see user "litiales") are observing this as well.

            Assignee:
            Ross Lawley
            Reporter:
            Oliver Bock
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: