Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I track/monitor opened/closed JMS connections in Glassfish?

I have a JavaEE application currently deployed on Glassfish for which I have written a load test that can, in less than one hour (for now - speed improvements to the crash are coming) exhaust the JMS connection pool and break Glassfish with the insanely bad message

In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.

I would like to see which of my JavaEE components leak JMS connections. For memory, I could use a profiler, as well as I could use it for JDBC connections, I guess. But what is the best tool to track opened/closed JMS connections and the components that create them and don't release them ?

like image 218
Riduidel Avatar asked Oct 07 '22 07:10

Riduidel


1 Answers

Try the imqcmd util to monitor your JMS destinations. It provides basic but usefull commands (list, purge, create ...)

It is located in $GLASSFISH_HOME/mq/bin

Try the followings commands:

  • list all your JMS destinations
./imqcmd list dst
  • print broker info
./imqcmd query brk
  • Show statistics (I guess it is what you are looking for). Statistics are refreshed every 5 seconds by default
./imqcmd metrics dst -t q -n jms/myQueue -m rts

-m rts stands for "Message rates". See documentation for other metrics information (./imqcmd -h ;-) )

Notice: every commands will prompt a username and password. admin/admin are the default username/password (!= asadmin credentials)

like image 181
Thibaud Avatar answered Oct 12 '22 00:10

Thibaud