activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r545202 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region: Queue.java Topic.java
Date Thu, 07 Jun 2007 14:43:27 GMT
Author: chirino
Date: Thu Jun  7 07:43:26 2007
New Revision: 545202

URL: http://svn.apache.org/viewvc?view=rev&rev=545202
Log:
Fix for XARecoveryBrokerTest

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java?view=diff&rev=545202&r1=545201&r2=545202
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Thu Jun  7 07:43:26 2007
@@ -346,7 +346,7 @@
             if (log.isDebugEnabled()) {
                 log.debug("Expired message: " + message);
             }
-            if( producerExchange.getProducerState().getInfo().getWindowSize() > 0 || !message.isResponseRequired()
) {
+            if( ( !message.isResponseRequired() || producerExchange.getProducerState().getInfo().getWindowSize()
> 0 ) && !context.isInRecoveryMode() ) {
         		ProducerAck ack = new ProducerAck(producerExchange.getProducerState().getInfo().getProducerId(),
message.getSize());
 				context.getConnection().dispatchAsync(ack);	    	            	        		
             }
@@ -370,7 +370,7 @@
         			                log.debug("Expired message: " + message);
         			            }
         			            
-        			            if( !message.isResponseRequired() ) {
+        			            if( !message.isResponseRequired() && !context.isInRecoveryMode()
) {
         			        		ProducerAck ack = new ProducerAck(producerExchange.getProducerState().getInfo().getProducerId(),
message.getSize());
         							context.getConnection().dispatchAsync(ack);	    	            	        		
         			            }
@@ -381,7 +381,7 @@
 	            	        try {							
 	            	        	doMessageSend(producerExchange, message);
 							} catch (Exception e) {
-	            	        	if( message.isResponseRequired() ) {
+	            	        	if( message.isResponseRequired() && !context.isInRecoveryMode()
) {
     				                ExceptionResponse response = new ExceptionResponse(e);
     				                response.setCorrelationId(message.getCommandId());
     								context.getConnection().dispatchAsync(response);	    								
@@ -427,7 +427,7 @@
         if(store!=null&&message.isPersistent()){
             store.addMessage(context,message);
         }
-        if( producerExchange.getProducerState().getInfo().getWindowSize() > 0 || !message.isResponseRequired()
) {
+        if( ( !message.isResponseRequired() || producerExchange.getProducerState().getInfo().getWindowSize()
> 0 ) && !context.isInRecoveryMode() ) {
     		ProducerAck ack = new ProducerAck(producerExchange.getProducerState().getInfo().getProducerId(),
message.getSize());
 			context.getConnection().dispatchAsync(ack);	    	            	        		
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java?view=diff&rev=545202&r1=545201&r2=545202
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
Thu Jun  7 07:43:26 2007
@@ -264,7 +264,7 @@
             if (log.isDebugEnabled()) {
                 log.debug("Expired message: " + message);
             }
-            if( producerExchange.getProducerState().getInfo().getWindowSize() > 0 || !message.isResponseRequired()
) {
+            if( ( !message.isResponseRequired() || producerExchange.getProducerState().getInfo().getWindowSize()
> 0 ) && !context.isInRecoveryMode() ) {
         		ProducerAck ack = new ProducerAck(producerExchange.getProducerState().getInfo().getProducerId(),
message.getSize());
 				context.getConnection().dispatchAsync(ack);	    	            	        		
             }
@@ -289,7 +289,7 @@
         			                log.debug("Expired message: " + message);
         			            }
         			            
-        			            if( !message.isResponseRequired() ) {
+        			            if( !message.isResponseRequired() && !context.isInRecoveryMode()
) {
         			        		ProducerAck ack = new ProducerAck(producerExchange.getProducerState().getInfo().getProducerId(),
message.getSize());
         							context.getConnection().dispatchAsync(ack);	    	            	        		
         			            }
@@ -300,7 +300,7 @@
 	            	        try {							
 	            	        	doMessageSend(producerExchange, message);
 							} catch (Exception e) {
-	            	        	if( message.isResponseRequired() ) {
+	            	        	if( message.isResponseRequired() && !context.isInRecoveryMode()
) {
     				                ExceptionResponse response = new ExceptionResponse(e);
     				                response.setCorrelationId(message.getCommandId());
     								context.getConnection().dispatchAsync(response);	    								



Mime
View raw message