We are using jetty-monitor to print the thread usage, which following the configurations on the link [1]. After running the jetty server for a while, we found that tons of EventState instances, which were held by the _states variable in the AttrEventTrigger. We are trying to dive into the monitor the codes, it seems that the issue is that, the thread status retrieved from the mbean server are saved in the _states map in the match method, but there is no remove action is invoked. So is it possible an issue here ?
Although the jetty version we used is an very old one 7.6.7, it seems that no code is changed in the lastest 9.x version.
public final boolean match(long timestamp)
throws Exception
{
MBeanServerConnection serverConnection = JMXMonitor.getServiceConnection();
TYPE value = null;
try
{
int pos = this._attributeName.indexOf('.');
if (pos < 0) {
value = (Comparable)serverConnection.getAttribute(this._nameObject, this._attributeName);
} else {
value = getValue((CompositeData)serverConnection.getAttribute(this._nameObject, this._attributeName.substring(0, pos)), this._attributeName
.substring(pos + 1));
}
}
catch (Exception ex)
{
LOG.debug(ex);
}
boolean result = false;
if (value != null)
{
result = match(value);
if ((result) || (getSaveAll())) {
this._states.put(Long.valueOf(timestamp), new EventState(
getID(), getNameString(), value));
}
}
return result;
}