DestinationDesc desc = AdminTopic.lookupDest(req.getName(), req.getType());
if (desc == null) {
Destination dest = null;
if (DestinationConstants.isQueue(req.getType())) {
// Create a local queue.
dest = new Queue();
} else if (DestinationConstants.isTopic(req.getType())) {
// Create a local topic.
dest = new Topic();
} else {
throw new RequestException("Could not create destination, unknown type:" + req.getType());