TabularType tt = new TabularType("MessageList", "MessageList", ct, new String[] {"JMSMessageID"});
TabularDataSupport rc = new TabularDataSupport(tt);
MessageEvaluationContext ctx = new MessageEvaluationContext();
ctx.setDestination(destination.getActiveMQDestination());
BooleanExpression selectorExpression = selector == null ? null : new SelectorParser().parse(selector);
for (int i = 0; i < messages.length; i++) {
try {
if (selectorExpression == null) {
rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i])));
} else {
ctx.setMessageReference(messages[i]);
if (selectorExpression.matches(ctx)) {
rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i])));
}
}
} catch (Throwable e) {
LOG.warn("exception browsing destination", e);