After investigating the ongoing periodic timeouts while adding query metrics to the JMS queue and the resulting webserver deadlocks, it appears that there are deadlock issues in the JMS server reattach connection code (not our original issue, but found in testing), and the original timeouts might be due to the large message path through the JMS server.
It seems less error prone at this point to remove the JMS queue from between QueryMetricsBean and QueryMetricWriter and instead inject QueryMetricsWriter into QueryMetricsBean transferring the metrics via a LinkedBlockingQueue.
After investigating the ongoing periodic timeouts while adding query metrics to the JMS queue and the resulting webserver deadlocks, it appears that there are deadlock issues in the JMS server reattach connection code (not our original issue, but found in testing), and the original timeouts might be due to the large message path through the JMS server.
It seems less error prone at this point to remove the JMS queue from between QueryMetricsBean and QueryMetricWriter and instead inject QueryMetricsWriter into QueryMetricsBean transferring the metrics via a LinkedBlockingQueue.