protected QueueBrowser createBrowser(Destination destination, DestinationConfig dConfig) throws JMSException {
if (dConfig.getDomain() == Domain.QUEUE.getId() && hermes.getSessionConfig().isUseConsumerForQueueBrowse()) {
log.debug("using a MessageConsumer for the QueueBrowse");
return new QueueBrowserWithConsumer(hermes, (Queue) destination, dConfig.getSelector(), HermesBrowser.getBrowser().getQueueBrowseConsumerTimeout());
} else {
return hermes.createBrowser(dConfig);
}
}