Announcement Announcement Module
No announcement yet.
JMX attributes do not appear on Tomcat Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMX attributes do not appear on Tomcat

    I'm using Spring 1.2.2 with Tomcat 5.0.

    I have the following JMX/MBean configuration in my application context file.

    <bean id="exporter" class="org.springframework.jmx.export.MBeanExporte r">
    <property name="beans">
    <entry key="bean:name=presenceService">
    <ref local="presenceService"/>
    <property name="assembler">
    <bean class="org.springframework.jmx.export.assembler.Me thodNameBasedMBeanInfoAssembler">
    <property name="methodMappings">
    <entry key="bean:name=presenceService"><value>getJabberSe rver,getJabberServerPort,getEnable</value></entry>

    When I deploy my app on JBoss 4.0.2 and point my browser to http://localhost:8080/web-console, I can see three attributes - getJabberServer, getJabberServerPort, getEnable - on the JMX console and the values of the attributes displayed there are correct.

    However, when I deploy the same app/configuration on Tomcat 5.0, and point my browser to http://localhost:8080/manager/jmxproxy/?qry=*:*, I can only see the name of my JMX bean but not its attributes. The following two lines are all I got.

    Name: bean:name=presenceService
    modelerType: com.sitescape.ef.presence.impl.PresenceServiceImpl

    All Tomcat JMX components themlselves are displayed correctly with their attribute values included.

    Does anyone know why this discrepency? Any help would be appreciated.

  • #2
    Standard MBeans work

    To further investigate the problem, I added another bean that actually implements MBean interface (i.e., standard MBeans) and Tomcat displays the attributes of the bean without problem. So it appears that only the dynamic/model MBeans setup is not working. Does anyone know if this is a problem with Tomcat's JMX support?


    • #3
      What about Spring 1.2.6?


      • #4
        no difference

        I just tried Spring 1.2.6, but still the same.


        • #5
          Can you please raise an issue on JIRA? It would help if you could provide a simple test/example that demonstrates the problem. Thanks.


          • #6

            I encountered the same behaviour when i had to change the
            JAVA_HOME for JBoss from 1.5 to 1.42 for production,
            i've tried interface mappings,commons-attributes and method-based export
            interface = attributes are all null
            common-attributes = only the first attribute was shown with null value
            method-based = the last method was exposed as an operation the rest as attributes with null value

            with jdk 1.5 it worked fine.


            • #7
              changed ManagedAttribute to ManagedOperation
              now all metadata are exported under jdk142 with jboss327
              when the operation is invoked the attribute value is returned