Package org.exolab.jms.tools.migration.proxy

Examples of org.exolab.jms.tools.migration.proxy.Subscription


                    Consumer consumer = (Consumer) consumers.get(name);
                    if (consumer == null) {
                        consumer = new Consumer(name, null);
                        consumers.put(name, consumer);
                    }
                    Subscription subscription = getSubscription(name,
                                                                destination);
                    consumer.addSubscription(subscription);
                }
            } else {
                final String name = destination.getName();
                Consumer consumer = (Consumer) consumers.get(name);
                if (consumer == null) {
                    consumer = new Consumer((JmsQueue) destination);
                    consumers.put(name, consumer);
                }
                Subscription subscription = getSubscription(name, destination);
                consumer.addSubscription(subscription);
            }
        }
        _database.commit();
        return consumers.values();
View Full Code Here


    private Subscription getSubscription(String name,
                                         JmsDestination destination)
            throws PersistenceException {

        Subscription result = new Subscription(destination);
        Connection connection = _database.getConnection();

        Vector handles = _database.getAdapter().getMessageHandles(connection,
                                                                  destination,
                                                                  name);
        Iterator iterator = handles.iterator();
        while (iterator.hasNext()) {
            MessageHandle handle = (MessageHandle) iterator.next();
            String id = handle.getMessageId();
            result.addMessage(id, handle.getDelivered());
        }
        return result;
    }
View Full Code Here

    private void add(Consumer consumer) throws JMSException,
                                               PersistenceException {

        Iterator iterator = consumer.getSubscriptions().iterator();
        while (iterator.hasNext()) {
            Subscription subscription = (Subscription) iterator.next();
            add(consumer, subscription);
        }
    }
View Full Code Here

TOP

Related Classes of org.exolab.jms.tools.migration.proxy.Subscription

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.