Uploaded image for project: 'HAL'
  1. HAL
  2. HAL-882

Missing JPA statistics


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.8.13
    • None
    • Subsystem Monitoring
    • None

      I always see zeros for the statistics and also cannot enable statistic gathering via the web console (when jboss.as.jpa.scopedname is set in the persistence.xml). I tried enabling the statistics via the jboss-cli tool and that worked. I can see non-zero statistics in the cli tool fine.

      More details:

      1. I tested with jboss.as.jpa.scopedname=scopedexamplename (see http://pastebin.com/G8YhfeEz)

      In cli, I change into the 2lc settings:

      cd /deployment=wildfly-hibernate4.war/subsystem=jpa/hibernate-persistence-unit=scopedexamplename

      Enable statistics:


      Access the application in the browser (reload http://localhost:8080/wildfly-hibernate4 a few times) and verified that the cli shows some non-zero statistics (e.g. session-open-count=8).

      However, in the web console, I can view JPA statistics but they are always zero (Sessions opened 0). This remains even if I click on refresh settings.

      This is with the attached wildfly-hibernate4.war.

      2. I see similar results if I update the persistence.xml to use jboss.as.jpa.scopedname=database_cache_postgres_webtng, which is a value mentioned in the bz.

      I should mention that on the persistence units screen, "persistence unit" is blank and deployment is "database_cache_postgres_webtng". I see similar JPA statistics (all counts are zero).

      3. If I change to use jboss.as.jpa.scopedname=wildfly-hibernate4#test_pu, the persistence units screen shows "persistence unit" is "test_pu" and deployment is "wildfly-hibernate4".

      I enable statistics in the jboss-cli tool via:
      cd /deployment=wildfly-hibernate4.war/subsystem=jpa/hibernate-persistence-unit=wildfly-hibernate4#test_pu

      I accessed the test app a few times and in the cli see session-open-count=5

      However, the web console still shows zeros for the jpa statistics.

            remerson@redhat.com Ryan Emerson
            rhn-support-hbraun Heiko Braun
            0 Vote for this issue
            2 Start watching this issue