final Collection<DestinationConfig> rval = new ArrayList<DestinationConfig>();
try {
String[] queues = (String[]) mbsc.getAttribute(new ObjectName(
"com.sap.default:j2eeType=jms,name=jms_provider/DEFAULT/" + virtualProvider), "QueueNames");
for (String queue : queues) {
DestinationConfig config = ConfigHelper.createDestinationConfig(queue, Domain.QUEUE);
config.setClassName(Queue.class.getName());
rval.add(config);
}
String[] topics = (String[]) mbsc.getAttribute(new ObjectName(
"com.sap.default:j2eeType=jms,name=jms_provider/DEFAULT/" + virtualProvider), "TopicNames");
for (String topic : topics) {
DestinationConfig config = ConfigHelper.createDestinationConfig(topic, Domain.TOPIC);
config.setClassName(Topic.class.getName());
rval.add(config);
}
} catch (Exception e) {
throw new HermesException(e);
}