Package nexj.core.rpc.jms.JMSUtil

Examples of nexj.core.rpc.jms.JMSUtil.MessagePropertyUpdater


                     tm.getTransaction().enlistResource(((XASession)errorSession).getXAResource());
                  }
               }

               redirect(message, getDestination(m_channel.getErrorQueue()), errorSession,
                  new MessagePropertyUpdater()
                  {
                     protected String m_sOldMessageId;
                     protected String m_sOldDestination;

                     public void getProperties(Message message) throws JMSException
                     {
                        m_sOldMessageId = message.getJMSMessageID();

                        Destination destination = message.getJMSDestination();

                        m_sOldDestination = (destination instanceof Queue) ?
                           "queue:" + ((Queue)destination).getQueueName() :
                           "topic:" + ((Topic)destination).getTopicName();
                     }

                     public void setProperties(Message message) throws JMSException
                     {
                        message.setStringProperty(JMS.OLD_MESSAGE_ID, m_sOldMessageId);
                        message.setStringProperty(JMS.OLD_DESTINATION, m_sOldDestination);
                     }
                  });

               bDone = true;
               return false;
            }
         }
         else if (message.propertyExists(JMS.BACKOFF_DELAY))
         {
            if (m_channel.isBroadcast())
            {
               s_logger.error("Message back-off not supported for topics (message " +
                  JMSUtil.getMessageId(message) + " in " + this + ")");
               s_logger.dump(message);
            }
            else
            {
               if (s_logger.isDebugEnabled())
               {
                  s_logger.debug("Delaying message " + JMSUtil.getMessageId(message) + " for " + this);
                  s_logger.dump(message);
               }

               connection = createConnection(m_channel);
               session = getSession(connection);

               redirect(message, getDestination(m_channel), session,
                  new MessagePropertyUpdater()
                  {
                     protected long m_lBackoffDelay;
                     protected long m_lMaxBackoffDelay;
                     protected int m_nErrorCount;
View Full Code Here

TOP

Related Classes of nexj.core.rpc.jms.JMSUtil.MessagePropertyUpdater

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.