Last updated by admin 3 years ago
Last updated by mjhugo 2 years ago
Enables Hibernate Statistics capture and exposes an MBean
To view the stats in a browser, browse to
http://HOST/APP_NAME/hibernateStats/
Stats collection is turned off by default. To turn it on, browse to the controller provided by the plugin (http://HOST/APP_NAME/hibernateStats/) and click the link for "Turn Stats Collection On". You can also change the default by adding an entry in Config.groovy:
hibernateStats.enabled = true
The MBean is not exposed by default - to expose the MBean, add this to your application Config.groovy:
hibernateStats.exposeMBean = true
The plugin adds a dynamic method to your domain classes (getEntityStats) that will return the entity statistics for that particular domain class. For an example, see the HibernateStatsController entityStats action
Hibernate Stats was written as an exercise for an article on how to write a Grails Plugin for the February 2009 edition of Groovy Mag (see
http://www.groovymag.com/main.issues.description/id=6/).
Last updated by admin 3 years ago
Last updated by admin 3 years ago