您可以使用JavaMelody来获取有关sql或http请求,jdbc连接等的统计信息。
You can do that via JMX.
For a start, go to http://localhost:8080/jmx-console and search for the JNDI name of the data source. This will show ~ 3 mbeans per datasource from where you can then get the statistics.
Of course you can get at the data programmatically - just follow the AMX example in your glassfish link on how to talk to the MBeanServer - of course you need to change the ObjectNames and Attribut names to reflect the JBoss ones.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.