-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.11.2
-
Component/s: Monitoring
-
None
As advised in JAVA-641, in order to use MBeans on Java 6 or greater alwaysUseMBeans has to be set to "true". Even if set, it may not work.
Test case:
MongoClientOptions.Builder builder = new MongoClientOptions.Builder(); builder.alwaysUseMBeans(true); MongoClient mongoConn = new MongoClient(new MongoClientURI("mongodb://localhost:27017", builder)); System.out.println(mongoConn.getMongoOptions().isAlwaysUseMBeans()); // Output: false
Patch with a code fix is attached.
- duplicates
-
JAVA-872 MongoOptions neglects to copy alwaysUseMBeans and reset writeConcern
- Closed