Package org.codehaus.activemq.service

Examples of org.codehaus.activemq.service.MessageContainer.addMessage()


            MessageContainer container = getContainer(message.getJMSDestination().toString());
            Set matchingSubscriptions = subscriptionContainer.getSubscriptions(message.getJMSActiveMQDestination());
            // note that we still need to persist the message even if there are no matching
            // subscribers as they may come along later
            // plus we don't pre-load subscription information
            container.addMessage(message);
            if (!matchingSubscriptions.isEmpty()) {
                for (Iterator i = matchingSubscriptions.iterator();i.hasNext();) {
                    Subscription sub = (Subscription) i.next();
                    if (sub.isTarget(message)) {
                        sub.addMessage(container, message);
View Full Code Here


            for (Iterator i = subscriptions.iterator(); i.hasNext();) {
                Subscription sub = (Subscription) i.next();
                if (sub.isTarget(message) && (!sub.isDurableTopic() || message.getJMSDeliveryMode() == DeliveryMode.NON_PERSISTENT)) {
                    if (container == null) {
                        container = getContainer(message.getJMSDestination().toString());
                        container.addMessage(message);
                    }
                    sub.addMessage(container, message);
                }
            }
            updateSendStats(client, message);
View Full Code Here

            for (Iterator i = subscriptions.iterator(); i.hasNext();) {
                Subscription sub = (Subscription) i.next();
                if (sub.isTarget(message) && (!sub.isDurableTopic() || message.getJMSDeliveryMode() == DeliveryMode.NON_PERSISTENT)) {
                    if (container == null) {
                        container = getContainer(message.getJMSDestination().toString());
                        container.addMessage(message);
                    }
                    sub.addMessage(container, message);
                }
            }
            updateSendStats(client, message);
View Full Code Here

       
        // note that we still need to persist the message even if there are no matching
        // subscribers as they may come along later
        // plus we don't pre-load subscription information
        final MessageContainer container = getContainer(message.getJMSDestination().toString());
        container.addMessage(message);

        TransactionManager.getContexTransaction().addPostCommitTask(new TransactionTask(){
            public void execute() throws Throwable {
                doSendMessage(client, message, container);
            }
View Full Code Here

        for (Iterator i = subscriptions.iterator(); i.hasNext();) {
            Subscription sub = (Subscription) i.next();
            if (sub.isTarget(message) && (!sub.isDurableTopic() || message.getJMSDeliveryMode() == DeliveryMode.NON_PERSISTENT)) {
                if (container == null) {
                    container = getContainer(message.getJMSDestination().toString());
                    container.addMessage(message);
                }
                sub.addMessage(container, message);
            }
        }
        updateSendStats(client, message);
View Full Code Here

        ActiveMQDestination dest = (ActiveMQDestination) message.getJMSDestination();
        if (dest != null && dest.isTopic() && message.getJMSDeliveryMode() == DeliveryMode.PERSISTENT) {
            MessageContainer container = getContainer(message.getJMSDestination().toString());

            // TODO note if we don't have any durable subscriptions then we might back up here
            container.addMessage(message);
            for (Iterator i = subscriptionContainer.subscriptionIterator(); i.hasNext();) {
                Subscription sub = (Subscription) i.next();
                if (sub.isTarget(message)) {
                    sub.addMessage(container, message);
                }
View Full Code Here

            for (Iterator i = subscriptionContainer.subscriptionIterator(); i.hasNext();) {
                Subscription sub = (Subscription) i.next();
                if (sub.isTarget(message) && (!sub.isDurableTopic() || message.getJMSDeliveryMode() == DeliveryMode.NON_PERSISTENT)) {
                    if (container == null) {
                        container = getContainer(message.getJMSDestination().toString());
                        container.addMessage(message);
                    }
                    sub.addMessage(container, message);
                }
            }
        }
View Full Code Here

            if (containers != null && !containers.isEmpty()) {
                // note that we still need to persist the message even if there are no matching
                // subscribers as they may come along later
                // plus we don't pre-load subscription information
                final MessageContainer container = getContainer(message.getJMSDestination().toString());
                container.addMessage(message);
                TransactionManager.getContexTransaction().addPostCommitTask(new TransactionTask() {
                    public void execute() throws Throwable {
                        doSendMessage(client, message, container);
                    }
                });
View Full Code Here

            MessageContainer container = getContainer(message.getJMSDestination().toString());
            Set matchingSubscriptions = subscriptionContainer.getSubscriptions(message.getJMSActiveMQDestination());
            // note that we still need to persist the message even if there are no matching
            // subscribers as they may come along later
            // plus we don't pre-load subscription information
            container.addMessage(message);
            if (!matchingSubscriptions.isEmpty()) {
                for (Iterator i = matchingSubscriptions.iterator();i.hasNext();) {
                    Subscription sub = (Subscription) i.next();
                    if (sub.isTarget(message)) {
                        sub.addMessage(container, message);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.