…his issue. In the case where the driver is not connected to a replica set, like in mongos HA, still may need to ensure there is a master
…nt people to MongoOptions.alwaysUseMBeans property
…s uses MBeans. The default is false, in which case the driver will use MXBeans on Java 6 or greater
…tionPool and Java5MongoConnectionPool. The former is an MBean and the latter is an MXBean. When creating a DBPortPool, conditionally create one or the other depending on whether java.version system property indicates that this is a 1.5 virtual machine. This should avoid JXM registration errors when running on Java 5 VMs. Also, by using MongoConnectionPool as the name of the MXBean, avoids incompatibilities in JMX implementations that require the MXBean name to be the same as the MXBean interface that it implements (minus the MXBean suffix).
…ely-called method, to avoid having it called more than once. Protected OutMessage by setting the buffer to null and checking for null everywhere it's used.
…o that it's safe to do equality comparision
…raps an InterruptedException. An instance of this class is thrown in cases where the driver is sleeping or waiting on a condition, and has to catch InterruptedException and do something besides swallowing it. Since InterruptedException is checked and so can't be thrown from methods that don't declare it, best thing to do it throw a runtime exception that can be handled in the application
…ve to be outside the null check, otherwise it's a race condition and the notification may never be received
…thods that take a write concern if the write concern is null
…wo for pointing it out.
…l class a lot... simpler. 1. Removed support for unlimited pool size. Now there is a single maximum size of the pool, representing the total number of potentially available and in-use members 2. Semaphore now has one permit for each pool member that are potentially available (either in available list or could be created). 3. Synchronized on this. Only enter synchronization block in get method if a permit has been acquired 4. Keeping track of list of available members (_avail) and set of checked out members (_out). Get method removes from _avail or creates new member, and adds to _out. Done method removes from _out and adds to _avail. 5. Removed debug and track leaks support 6. Updated JMX monitoring interface to reflect the new structure.