[JAVA-240] Mongo constructor should not attempt network connections and potentially throw exception that prevents app from starting Created: 21/Dec/10  Updated: 17/Mar/11  Resolved: 04/Feb/11

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5

Type: Improvement Priority: Major - P3
Reporter: Antoine Girbal Assignee: Antoine Girbal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Major Change

 Description   

constructors should always remain lean and not block.
Also we must not prevent the caller's application from starting.
Client apps will get error when doing operations and handle them as needed.



 Comments   
Comment by Brendan W. McAdams [ 25/Feb/11 ]

Should be clearly noted in the Release Notes as we internalize many retry checks that people previously had to write on external code.

If you are expecting the constructor to fail, and want the application to also fail.... Now your code will not do that.

Comment by Antoine Girbal [ 04/Feb/11 ]

this change will need to be very explicit in release notes

Comment by auto [ 01/Feb/11 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: JAVA-240: Mongo constructor should not attempt network connections and potentially throw exception that prevents app from starting
https://github.com/mongodb/mongo-java-driver/commit/a052b4f35af4069121cbf47adc88d6199563c4d4

Generated at Thu Feb 08 08:51:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.