0 Replies Latest reply on Mar 15, 2010 11:54 AM by gregory v

    Collecting statistics without modifying code

    gregory v Newbie

      Hi,

       

      I'm trying to enable Hibernate statistics without modifying my code (except for descriptors/persistence.xml). I'm currently not managing session factories etc.

       

      I use the EntityManager and second level cache in a very simple way and would like to keep it this way (that's why I use the EntityManager and not Hibernate objects to begin with). I was trying to follow tutorials to configure the mbean server to collect statistics but without success since I do not have session factories and therefore cannot bind them to a JNDI name that it could use. Does anybody know if using the EntityManager with JPA and not session factories still allows for statistics to be collected or I will have to modify my code to allow for that?

       

      I'm okay with annotations from hibernate in my code but I would like to not have specific code from Hibernate and stick with JPA as much as possible.

       

      Regards,

       

      Greg