Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuseSupport




JSPWiki v2.2.33

[RSS]


Hide Menu

HibernateJMX


Difference between version 5 and version 4:

At line 14 added 2 lines.
(Note: Under Windows, I started tomcat5w.exe and set the above properties in the Java
tab, in the textfield entitled 'Java Options').
At line 15 changed 1 line.
Inside StartupListener.java (inside contextInitialized method) add:
Then, if you are using Spring, add this to your applicationContext-resources.xml file:
At line 19 added 29 lines.
{{{
<bean id="jmxExporter"
class="org.springframework.jmx.export.MBeanExporter">
<property name="beans">
<map>
<entry key="bean:name=myHibernateBean">
<ref local="statisticsBean" />
</entry>
</map>
</property>
</bean>
<bean id="statisticsBean" class="org.hibernate.jmx.StatisticsService">
<property name="statisticsEnabled">
<value>true</value>
</property>
</bean>
}}}
Tomcat 5 already contains the MX4J libraries and your AppFuse project should
already have the Hibernate libraries in the runtime classpath.
Note: statisticsEnabled does not get set to true properly in the statisticsBean
(this is under investigation).
If you are not using Spring, inside StartupListener.java (inside contextInitialized method) add:

Back to HibernateJMX, or to the Page History.