I think it is a better idea to access the statistics via the Hibernate JMX statistics
MBean. I don't see an easy way to get access to the SessionFactory programmatically if
you are working with JPA. You can't get it from the Session/EntityManager.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040968#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...