activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r546847 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
Date Wed, 13 Jun 2007 12:47:29 GMT
Author: jstrachan
Date: Wed Jun 13 05:47:29 2007
New Revision: 546847

URL: http://svn.apache.org/viewvc?view=rev&rev=546847
Log:
applied fix for AMQ-1232 and AMQ-1275

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java?view=diff&rev=546847&r1=546846&r2=546847
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java Wed
Jun 13 05:47:29 2007
@@ -1594,24 +1594,13 @@
 			// tell the Broker we are about to start a new transaction
 			doStartTransaction();
 			TransactionId txid=transactionContext.getTransactionId();
-			message.setJMSDestination(destination);
-			message.setJMSDeliveryMode(deliveryMode);
-			long expiration=0L;
-			if(!producer.getDisableMessageTimestamp()){
-				long timeStamp=System.currentTimeMillis();
-				message.setJMSTimestamp(timeStamp);
-				if(timeToLive>0){
-					expiration=timeToLive+timeStamp;
-				}
-			}
-			message.setJMSExpiration(expiration);
-			message.setJMSPriority(priority);
-			long sequenceNumber=producer.getMessageSequence();
-			message.setJMSRedelivered(false);
-			// transform to our own message format here
+            long sequenceNumber=producer.getMessageSequence();
+
+            // transform to our own message format here
 			ActiveMQMessage msg=ActiveMQMessageTransformation.transformMessage(
 			        message,connection);
-			// Set the message id.
+
+            // Set the message id.
 			if(msg==message){
 				msg.setMessageId(new MessageId(producer.getProducerInfo()
 				        .getProducerId(),sequenceNumber));
@@ -1620,7 +1609,22 @@
 				        .getProducerId(),sequenceNumber));
 				message.setJMSMessageID(msg.getMessageId().toString());
 			}
-			msg.setTransactionId(txid);
+
+            msg.setJMSDestination(destination);
+			msg.setJMSDeliveryMode(deliveryMode);
+			long expiration=0L;
+			if(!producer.getDisableMessageTimestamp()){
+				long timeStamp=System.currentTimeMillis();
+				msg.setJMSTimestamp(timeStamp);
+				if(timeToLive>0){
+					expiration=timeToLive+timeStamp;
+				}
+			}
+			msg.setJMSExpiration(expiration);
+			msg.setJMSPriority(priority);
+			msg.setJMSRedelivered(false);
+
+            msg.setTransactionId(txid);
             if(connection.isCopyMessageOnSend()){
                 msg=(ActiveMQMessage)msg.copy();
             }



Mime
View raw message