Announcement Announcement Module
Collapse
No announcement yet.
JMX Pojo Problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMX Pojo Problem

    Hello. Sorry if this is a newbie question, I'm new to JMX but not to Spring.

    I'm having trouble getting some of my beans to work, but some do... I'm exporting several, and it seems like the beans that are strictly from the Spring packages work just fine, but my pojos don't. I'm connecting using tomcat's ant jmx package. When I try to connect to any of my own beans (pojos) I get errors like this:

    C:\work\SFIndexing\deploy.xml:167: javax.management.AttributeNotFoundException: Cannot find ModelMBeanAttributeInfo for attribute foo

    My Beans are exported from spring like this (and note, the others work!)

    The one that does not work is Test:name=testMbean

    I have 1 other bean that does not work which is a subclass of org.springframework.cache.ehcache.EhCacheManagerFa ctoryBean. The parent class' methods are exposed, but none of the methods which I define in my subclass.

    <bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServer FactoryBean"/>

    <bean id="registry" class="org.springframework.remoting.rmi.RmiRegistr yFactoryBean">
    <property name="port" value="${prop.jmx.server.port}"/>
    </bean>

    <bean id="serverConnector" class="org.springframework.jmx.support.ConnectorSe rverFactoryBean" >
    <property name="objectName" value="connector:name=rmi"/>
    <property name="server" ref="mbeanServer"/>
    <property name="serviceUrl" value="service:jmx:rmi://localhost:${prop.jmx.jndi.port}/jndi/rmi://localhost:${prop.jmx.server.port}/server" />
    </bean>

    <bean id="jmxExporter"
    class="org.springframework.jmx.export.MBeanExporte r" lazy-init="false">
    <property name="beans">
    <map>
    <entry key="Lucene:name=luceneIndexes"><ref bean="lucene.LocationIndexManager"/></entry>
    <entry key="Lucene:name=qsIndexes"><ref bean="lucene.QSIndexManager"/></entry>
    <entry key="Lucene:name=spaIndexes"><ref bean="lucene.SpaIndexManager"/></entry>
    <entry key="Lucene:name=contentIndexes"><ref bean="lucene.ContentIndexManager"/></entry>
    <entry key="Cache:name=searchCache"><ref bean="ehcache.searchCache"/></entry>
    <entry key="Test:name=testMbean"><ref bean="test.mbean"/></entry>
    </map>
    </property>
    <property name="server" ref="mbeanServer"/>
    </bean>

  • #2
    Still stuck on this. BTW - using Java 1.4.

    Comment


    • #3
      Did you find a solution to your problem? Would really appreciate if you can share it.

      Thanks,
      Sreekant

      Comment

      Working...
      X