-
Nov 30th, 2007, 12:16 PM
#1
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>
-
Dec 3rd, 2007, 08:30 AM
#2
Still stuck on this. BTW - using Java 1.4.
-
Apr 15th, 2008, 06:51 PM
#3
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
-
Forum Rules