Package org.exolab.jms.config

Examples of org.exolab.jms.config.AdministeredTopic


     *
     * @param topics the topics to configure
     */
    protected void configureTopics(AdministeredTopic[] topics) {
        for (int i = 0; i < topics.length; ++i) {
            final AdministeredTopic topic = topics[i];
            final String name = topics[i].getName();

            if (_destinations.getDestination(name) == null) {
                final JmsTopic destination = new JmsTopic(name);
                destination.setPersistent(true);
                try {
                    _destinations.createDestination(destination);

                    // register the subscribers for each topic.
                    int scount = topic.getSubscriberCount();
                    for (int sindex = 0; sindex < scount; sindex++) {
                        Subscriber subscriber = topic.getSubscriber(sindex);
                        _consumers.subscribe(destination,
                                             subscriber.getName(), null);
                    }
                } catch (JMSException exception) {
                    _log.error("Failed to register persistent topic " + name,
View Full Code Here

TOP

Related Classes of org.exolab.jms.config.AdministeredTopic

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.