I have a maven application running on JBoss EAP 7.2 . Below details:
- Build: Maven 3.6
- Server: JBoss EAP 7.2
- Java: OpenJDK 11
- JavaMelody Core: 1.83.0
- Package: EAR
- Application: Struts 2.5.22
- DB: Oracle 18c
- OJDBC Driver: 18.3
Although I managed to configure JavaMelody and see the main statistics, I can't seem to find a way to configure the SQL monitoring.
Currently, for my JDBC configuration I use the <jta-data-source>java:jboss/datasources/myDS</jta-data-source>
in my persistence.xml
file, which reads the datasource from the standalone.xml of the JBoss server.
I have tried several changes in my persistence.xml
file like adding:
<property name="net.bull.javamelody.jpa.provider" value="org.hibernate.jpa.HibernatePersistenceProvider" />
or
<property name="hibernate.connection.driver_class" value="net.bull.javamelody.JdbcDriver"/>
My struts.xml
configuration:
<package name="myApp" extends="struts-default">
<interceptors>
<interceptor name="monitoring" class="net.bull.javamelody.StrutsInterceptor"/>
<interceptor-stack name="myAppStack">
<interceptor-ref name="monitoring"/>
<interceptor-ref name="prepare"/>
...
<interceptor-ref name="json"/>
<interceptor-ref name="debugging"/>
<interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="myAppStack"/>
</package>
or even configuring my datasource entirely in the persistence file using the hibernate.connection.url/username/password properties, but with no luck.
I tried to following the instructions found here, but I can't seem to find what is wrong:
- https://github.com/javamelody/javamelody/wiki/UserGuide#7-jdbc
- https://github.com/javamelody/javamelody/wiki/UserGuideAdvanced#jpa-monitoring
Note: In my persistence.xml I was using also <property name="hibernate.connection.driver" value="oracle.jdbc.OracleDriver" />
. I am not sure if this is somehow conflicting.