Examples of shallowCopy()


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

            this.accessThread = Thread.currentThread();
            ActiveMQMessage message = (ActiveMQMessage) messageQueue.dequeue(timeout);
            this.accessThread = null;
            if (message != null) {
                messageDelivered(message, true);
                message = message.shallowCopy();
            }
            return message;
        }
        catch (InterruptedException ioe) {
            return null;
View Full Code Here

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

        session.setSessionConsumerDispatchState(ActiveMQSession.CONSUMER_DISPATCH_SYNC);
        try {
            ActiveMQMessage message = (ActiveMQMessage) messageQueue.dequeueNoWait();
            if (message != null) {
                messageDelivered(message, true);
                return message.shallowCopy();
            }
        }
        catch (InterruptedException ioe) {
            throw new JMSException("Queue is interrupted: " + ioe.getMessage());
        }
View Full Code Here

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

    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

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

                    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

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

            message.setJMSMessageID(producerKey + sequenceNumber);
        }
        //transform to our own message format here
        ActiveMQMessage msg = ActiveMQMessageTransformation.transformMessage(message);
        if (connection.isCopyMessageOnSend()){
            msg = msg.shallowCopy();
        }
        //clear identity - incase forwared on
        msg.setJMSMessageIdentity(null);
        connection.validateDestination(msg.getJMSActiveMQDestination());
       
View Full Code Here

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

    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

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

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

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

                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

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
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.