decaf::util::ArrayList< Pointer<ActiveMQDestination> > ActiveMQDestination::getCompositeDestinations() const {

    if (!this->compositeDestinations.isEmpty()) {
        return this->compositeDestinations;
    }

    if (this->isComposite()) {

        StlSet<std::string> components;
        StringTokenizer iter(this->physicalName, ActiveMQDestination::COMPOSITE_SEPARATOR);
        while (iter.hasMoreTokens()) {
            std::string name = trim(iter.nextToken());
            if (name.length() == 0) {
                continue;
            }
            components.add(name);
        }

        Pointer< Iterator<std::string> > iterator(components.iterator());
        while (iterator->hasNext()) {
            compositeDestinations.add(createDestination(iterator->next()));
        }
    }

    return this->compositeDestinations;
}