[hornetq-commits] JBoss hornetq SVN: r10777 - branches/Branch_2_2_EAP/src/main/org/hornetq/jms/client.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Jun 6 16:25:18 EDT 2011


Author: clebert.suconic at jboss.com
Date: 2011-06-06 16:25:18 -0400 (Mon, 06 Jun 2011)
New Revision: 10777

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/jms/client/HornetQMessageProducer.java
Log:
Reverting fix to make it jms api compliant (I have mistakenly interpreted a rule)

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/jms/client/HornetQMessageProducer.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/jms/client/HornetQMessageProducer.java	2011-06-06 15:33:59 UTC (rev 10776)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/jms/client/HornetQMessageProducer.java	2011-06-06 20:25:18 UTC (rev 10777)
@@ -314,17 +314,14 @@
 
    private void doSend(final Message message, final long timeToLive, HornetQDestination destination) throws JMSException
    {
-      if (message.getJMSExpiration() == 0)
+      if (timeToLive == 0)
       {
-         if (timeToLive == 0)
-         {
-            message.setJMSExpiration(0);
-         }
-         else
-         {
-            message.setJMSExpiration(System.currentTimeMillis() + timeToLive);
-         }
+         message.setJMSExpiration(0);
       }
+      else
+      {
+         message.setJMSExpiration(System.currentTimeMillis() + timeToLive);
+      }
 
       if (!disableMessageTimestamp)
       {



More information about the hornetq-commits mailing list