On a related note, it seems that neither PurgeCommand nor BrowseCommand support
-xmsgsel:
This is the options code: (which is pretty much the same as the --msgsel):
} else if (token.startsWith("--xmsgsel")) {
// If token is a substractive message selector option
// If no message selector is specified, or next token is a new
// option
if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
context.printException(new IllegalArgumentException("Message
selector not specified"));
return;
}
StringTokenizer queryTokens = new
StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
while (queryTokens.hasMoreTokens()) {
querySubObjects.add(queryTokens.nextToken());
}
But in the runTasks, it only looks at queryAddObjects:
// Iterate through the queue result
for (Iterator j = queueList.iterator(); j.hasNext();) {
List messages =
JmxMBeansUtil.createMessageQueryFilter(createJmxConnection(),
((ObjectInstance)j.next()).getObjectName()).query(queryAddObjects);
context.printMessage(JmxMBeansUtil.filterMessagesView(messages, groupViews,
queryViews));
}
Shouldn't it take that list, and subtract anything that was in --xmsgsel?
--Allen