I have spring 2.5.1, JDk 1.6.0_03 and Tomcat 6.0.16
I built petclinic sample and deployed the war in tomcat.
Connected a JConsole to see the MBeans
Under petclinic service,I do see the following MBean
However I do not see HibernateStatistics MBean.
petclinic is built to use hsqldb and app runs fine so hibernate is working fine.
Log indicates that AnnonationMBeanExporter only detects "clinic" and "callMonitor"
While I've spent sometime trying to triage this and continue to do so. Meanwhile I was wondering if someone could point me to the right direction to troubleshoot why HibernateStatistics MBean is not getting exported.
Relevent section of applicationContext-Hibernate.xml (unchanged from sample that comes wiht 2.5.1) is as follows -
<bean id="clinic" class="org.springframework.samples.petclinic.hibernate.HibernateClinic"/>
<bean name="petclinic:type=HibernateStatistics" class="org.hibernate.jmx.StatisticsService" autowire="byName"/>