Hibernate Jmx Configuration in Spring


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <bean class="org.springframework.jmx.export.MBeanExporter">
  2. <property name="autodetect" value="false" />
  3. <property name="assembler">
  4. <bean id="jmxAssembler"
  5. class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
  6. <property name="attributeSource">
  7. <bean
  8. class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource" />
  9. </property>
  10.  
  11. </bean>
  12. </property>
  13. <property name="beans">
  14. <map>
  15. <entry key="org.hibernate:name=statistics">
  16. <bean class="org.hibernate.jmx.StatisticsService">
  17. <property name="statisticsEnabled" value="true" />
  18. <property name="sessionFactory" ref="sessionFactory" />
  19. </bean>
  20.  
  21. </entry>
  22. </map>
  23. </property>
  24. </bean>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.