Reputation: 435
i'm using tomcat 5.5, with a spring app, and i having memory leak problems. so i'm trying to connect jmx in my spring app to monitoring the app, and try to find what is causing the memory leak, but i can't yet.
i add the Mbeanexporter in my aplicationContext.xml
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="beans">
<map>
<entry key="bean:name=catalogFacadeTarget1" value-ref="catalogFacadeTarget"/>
</map>
</property>
</bean>
and in the catalina.sh
export CATALINA_OPTS="-Dcom.sun.management.jmxremote.port=8081
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.managment.jmxremote.host=localhost
-Dcom.sun.management.jmxremote.authenticate=false"
i run jconsole, but there no have any of my bean.
i need some direction here, thank you for any advice!
Upvotes: 0
Views: 490
Reputation: 527
I found this tutorial on google, maybe it could help you:
http://blog.markshead.com/1129/connecting-visual-vm-to-tomcat-7/
Upvotes: 0
Reputation: 11
Be sure to set lazy-init = false
for your MBeanExporter to get picked up. Like so:
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
...
</bean>
That should do the trick.
Upvotes: 1