Mantis - Resin
Viewing Issue Advanced Details
5212 major always 09-13-12 03:16 10-24-12 11:38
kay  
ferg  
normal  
closed 4.0.30  
fixed  
none    
none 4.0.33  
0005212: jmx registration error
We are seeing the following error message Resin's log since when we are using MongoDB java driver 2.9.0:
    
[12-09-11 11:40:21.358] {main} jmx registration error: com.mongodb.util.management.JMException: javax.management.NotCompliantMBeanException: com.mongodb:type=ConnectionPool,host=sx177.ipx/172.x.x.x,port=27018,instance=1 mbean has no MBean interface for class com.mongodb.DBPortPool continuing...

This error does not occur using MongoDB's previous java driver v2.8.0

The problem is that Resin (v4.0.30) checks whether the MBean is an instance of DynamicBean OR implements a MBeanInterface. The class name of the latter must end with the name of the implemented interface or superclass appended with MBean or MXBean.
The first is the case for MongoDB's driver v2.8.0 since SimplePool implements DynamicMBean. For v2.9.0 however, neither the first nor the latter is the case because it does not implement DynamicMBean anymore and the implemented interface does not follow Resin's naming convention.

Thus, the question is, whether Resin or MongoDB driver needs to be fixed to follow the official JMX naming specification.

According to http://docs.oracle.com/javase/6/docs/api/javax/management/MXBean.html: [^]

        Otherwise, it may be an MXBean. The set of interfaces implemented by the object is examined for interfaces that:
            have a class name SMXBean where S is any non-empty string, and do not have an annotation @MXBean(false); and/or
            have an annotation @MXBean(true) or just @MXBean.

So I rather think that Resin should be fixed.
BTW, other application servers, as for example Glassfish, don't throw any jmx registration errors.

Related link to the concerned MongoDB's JIRA task:
https://jira.mongodb.org/browse/JAVA-641 [^]

Notes
(0006069)
ferg   
10-24-12 11:38   
env/01q4