Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
2.11.2
-
None
Description
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.
Attachments
Issue Links
- duplicates
-
JAVA-872 MongoOptions neglects to copy alwaysUseMBeans and reset writeConcern
-
- Closed
-