Results 1 to 3 of 3

Thread: JMX Pojo Problem

  1. #1
    Join Date
    Aug 2004
    Location
    Brooklyn, NY
    Posts
    20

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Brooklyn, NY
    Posts
    20

    Default

    Still stuck on this. BTW - using Java 1.4.

  3. #3

    Default

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

    Thanks,
    Sreekant

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •