Skip to content

Commit 320b82d

Browse files
committed
JAVA-641: Updated exception error message for JMX registration to point people to MongoOptions.alwaysUseMBeans property
1 parent 8d0e704 commit 320b82d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/com/mongodb/DBPortPool.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,12 @@ DBPortPool get( ServerAddress addr ){
9090
}
9191
MBeanServerFactory.getMBeanServer().registerMBean(p, on);
9292
} catch (JMException e) {
93-
Bytes.LOGGER.log(Level.WARNING, "jmx registration error: " + e + " continuing...");
93+
Bytes.LOGGER.log(Level.WARNING, "JMX registration error: " + e +
94+
"\nConsider setting com.mongodb.MongoOptions.alwaysUseMBeans property to true." +
95+
"\nContinuing...");
9496
} catch (java.security.AccessControlException e) {
95-
Bytes.LOGGER.log(Level.WARNING, "jmx registration error: " + e + " continuing...");
97+
Bytes.LOGGER.log(Level.WARNING, "JMX registration error: " + e +
98+
"\nContinuing...");
9699
}
97100
}
98101

0 commit comments

Comments
 (0)