JON Hibernate Statistics showing HQL instead of SQL

Solution Verified - Updated -

Issue

  • I have configured JON 2.3.1 server and agents, and turned on Hibernate statistics.

  • I am able to monitor the Hibernate statistics. However, when I invoke the operation "View Queries". The result returned is not showing the native SQL statement, but HQL. Is this a bug?

Environment

  • JBoss Operations Network(JON) 2.3.1
  • Hibernate statistics enabled by using the following method:
    • add a file named “hibernate-service.xml” to the META-INF folder of the EJB project.
      <?xml version="1.0" encoding="UTF-8"?>
      <server>
         <mbean code="org.hibernate.jmx.StatisticsService"
             name="Hibernate:application=sams,type=statistics">
           <attribute name="SessionFactoryJNDIName">samsSF</attribute>
           <depends>jboss:service=Naming</depends>
         </mbean>
      </server>
    • edit the “META-INF/persistence.xml” file of the EJB project and add the following:
      <property name="hibernate.generate_statistics" value="true"/>
      <property name="hibernate.session_factory_name" value="samsSF"/>

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content