[JAVA-945] alwaysUseMBeans is not honoured Created: 11/Sep/13  Updated: 12/Sep/13  Resolved: 12/Sep/13

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

Type: Bug Priority: Major - P3
Reporter: Aliaksandr Voitau Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File alwaysUseMBeans.patch    
Issue Links:
Depends
Duplicate
duplicates JAVA-872 MongoOptions neglects to copy alwaysU... Closed

 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.



 Comments   
Comment by Jeffrey Yemin [ 12/Sep/13 ]

Sorry Alex, I know I asked you to open this, but it's actually a duplicate of JAVA-872

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