Author: clebert.suconic(a)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)
{
Show replies by date