5

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 ?

Riduidel
  • 22,052
  • 14
  • 85
  • 185

2 Answers2

4

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)

Riduidel
  • 22,052
  • 14
  • 85
  • 185
Thibaud
  • 56
  • 3
0

In Glassfish 3.1 console you can check the JMS Physical Destination Statistics. This is in Server -> JMS Physical Destinations Tab -> Click on View Statistics (You can copy the link and refresh this page to get the latest result, like the number of messages in the queue and memory in that moment)

Also I think the best way to monitoring JMS Queues is to insert some log info in your classes to control who is producing or consuming messages (and know who are opening/closing connections).

Lo Juego
  • 1,305
  • 11
  • 12