Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ActiveMQMessage.shallowCopy()


            this.accessThread = null;
            if (message != null) {
                boolean expired = message.isExpired();
                messageDelivered(message, true, expired);
                if (!expired) {
                    message = message.shallowCopy();
                }
                else {
                    message = (ActiveMQMessage) receiveNoWait(); //this will remove any other expired messages held in the queue
                }
            }
View Full Code Here


            this.accessThread = null;
            if (message != null) {
                boolean expired = message.isExpired();
                messageDelivered(message, true, expired);
                if (!expired) {
                    message = message.shallowCopy();
                }
                else {
                    message = (ActiveMQMessage) receiveNoWait(); //this will remove any other expired messages held in the queue
                }
            }
View Full Code Here

                messageDelivered(message, true, expired);
                if (!expired) {
                    if( message!=null && log.isDebugEnabled() ) {
                        log.debug("Message received: "+message);
                    }           
                    return message.shallowCopy();
                }
            }
        }
        catch (InterruptedException ioe) {
            throw new JMSException("Queue is interrupted: " + ioe.getMessage());
View Full Code Here

            this.accessThread = null;
            if (message != null) {
                boolean expired = message.isExpired();
                messageDelivered(message, true, expired);
                if (!expired) {
                    message = message.shallowCopy();
                }
                else {
                    message = (ActiveMQMessage) receiveNoWait(); //this will remove any other expired messages held in the queue
                }
            }
View Full Code Here

            this.accessThread = null;
            if (message != null) {
                boolean expired = message.isExpired();
                messageDelivered(message, true, expired);
                if (!expired) {
                    message = message.shallowCopy();
                }
                else {
                    message = (ActiveMQMessage) receiveNoWait(); //this will remove any other expired messages held in the queue
                }
            }
View Full Code Here

                messageDelivered(message, true, expired);
                if (!expired) {
                    if( message!=null && log.isDebugEnabled() ) {
                        log.debug("Message received: "+message);
                    }           
                    return message.shallowCopy();
                }
            }
        }
        catch (InterruptedException ioe) {
            throw new JMSException("Queue is interrupted: " + ioe.getMessage());
View Full Code Here

    public void onMessage(Message msg) {
        try {
            if (!stopped) {
                ActiveMQMessage message = (ActiveMQMessage) msg;
                if (message != null) {
                    message = message.shallowCopy();
                    message.addBrokerVisited(localBrokerName);
                    Destination destination = message.getJMSDestination();
                    int deliveryMode = message.getJMSDeliveryMode();
                    int priority = message.getJMSPriority();
                    long timeToLive = message.getJMSExpiration() - msg.getJMSTimestamp();
View Full Code Here

                    if (doDispatch) {
                        for (Iterator i = this.session.consumers.iterator(); i.hasNext();) {
                            ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer) i.next();
                            if (message.isConsumerTarget(consumer.getConsumerNumber())) {
                                try {
                                    consumer.processMessage(message.shallowCopy());
                                }
                                catch (JMSException e) {
                                    this.session.connection.handleAsyncException(e);
                                }
                            }
View Full Code Here

    public void onMessage(Message msg) {
        try {
            if (!stopped) {
                ActiveMQMessage message = (ActiveMQMessage) msg;
                if (message != null) {
                    message = message.shallowCopy();
                    message.addBrokerVisited(localBrokerName);
                    Destination destination = message.getJMSDestination();
                    int deliveryMode = message.getJMSDeliveryMode();
                    int priority = message.getJMSPriority();
                    long timeToLive = message.getJMSExpiration() - msg.getJMSTimestamp();
View Full Code Here

            this.accessThread = null;
            if (message != null) {
                boolean expired = message.isExpired();
                messageDelivered(message, true,expired);
                if (!expired){
                message = message.shallowCopy();
                }else {
                    message = (ActiveMQMessage) receiveNoWait(); //this will remove any other expired messages held in the queue
                }
            }
            return 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.