[hornetq-commits] JBoss hornetq SVN: r10673 - in branches/Branch_2_2_EAP: src/main/org/hornetq/core/server/impl and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon May 16 21:42:04 EDT 2011


Author: clebert.suconic at jboss.com
Date: 2011-05-16 21:42:03 -0400 (Mon, 16 May 2011)
New Revision: 10673

Modified:
   branches/Branch_2_2_EAP/.classpath
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
   branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java
Log:
Adding logs

Modified: branches/Branch_2_2_EAP/.classpath
===================================================================
--- branches/Branch_2_2_EAP/.classpath	2011-05-16 20:32:09 UTC (rev 10672)
+++ branches/Branch_2_2_EAP/.classpath	2011-05-17 01:42:03 UTC (rev 10673)
@@ -94,7 +94,7 @@
 	<classpathentry kind="src" path="examples/javaee/servlet-transport/src"/>
 	<classpathentry kind="src" path="examples/javaee/xarecovery/src"/>
 	<classpathentry kind="src" path="examples/soak/normal/src"/>
-	<classpathentry kind="lib" path="thirdparty/junit/lib/junit.jar"/>
+	<classpathentry kind="lib" path="thirdparty/junit/lib/junit.jar" sourcepath="/home/clebert/.m2/repository/junit/junit/3.8.2/junit-3.8.2-sources.jar"/>
 	<classpathentry kind="lib" path="thirdparty/apache-logging/lib/commons-logging.jar"/>
 	<classpathentry kind="lib" path="thirdparty/apache-xerces/lib/xercesImpl.jar"/>
 	<classpathentry kind="lib" path="thirdparty/sun-jaxb/lib/jaxb-api.jar"/>

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java	2011-05-16 20:32:09 UTC (rev 10672)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java	2011-05-17 01:42:03 UTC (rev 10673)
@@ -1671,19 +1671,14 @@
 
       int maxDeliveries = addressSettings.getMaxDeliveryAttempts();
 
-      if (isTrace)
-      {
-         log.trace("Checking redelivery for reference = " + reference + " with maxDeliveries = " + maxDeliveries + " on queue " + address);
-      }
-
       // First check DLA
       if (maxDeliveries > 0 && reference.getDeliveryCount() >= maxDeliveries)
       {
          if (isTrace)
          {
-            log.trace("Sending reference " + reference + " to DLA");
+            log.trace("Sending reference " + reference + " to DLA = " + addressSettings.getDeadLetterAddress() +  " since ref.getDeliveryCount=" + reference.getDeliveryCount() + "and maxDeliveries=" + maxDeliveries + " from queue=" + this.getName());
          }
-         sendToDeadLetterAddress(reference);
+         sendToDeadLetterAddress(reference, addressSettings.getDeadLetterAddress());
 
          return false;
       }
@@ -1694,6 +1689,10 @@
 
          if (redeliveryDelay > 0)
          {
+            if (isTrace)
+            {
+               log.trace("Setting redeliveryDelay=" + redeliveryDelay + " on reference=" + reference);
+            }
             reference.setScheduledDeliveryTime(timeBase + redeliveryDelay);
             
             if (message.isDurable() && durable)
@@ -1774,10 +1773,14 @@
       }
    }
 
+   
    private void sendToDeadLetterAddress(final MessageReference ref) throws Exception
    {
-      SimpleString deadLetterAddress = addressSettingsRepository.getMatch(address.toString()).getDeadLetterAddress();
-
+      sendToDeadLetterAddress(ref, addressSettingsRepository.getMatch(address.toString()).getDeadLetterAddress());
+   }
+   
+   private void sendToDeadLetterAddress(final MessageReference ref, final  SimpleString deadLetterAddress) throws Exception
+   {
       if (deadLetterAddress != null)
       {
          Bindings bindingList = postOffice.getBindingsForAddress(deadLetterAddress);

Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java	2011-05-16 20:32:09 UTC (rev 10672)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java	2011-05-17 01:42:03 UTC (rev 10673)
@@ -3748,6 +3748,7 @@
       clearData();
 
       Configuration config = createDefaultConfig();
+      config.setMessageExpiryScanPeriod(500);
 
       config.setJournalSyncNonTransactional(false);
 



More information about the hornetq-commits mailing list