JON Hibernate Statistics showing HQL instead of SQL
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"/>
- add a file named “hibernate-service.xml” to the META-INF folder of the EJB project.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
