Permalink
Browse files

Adding logs

  • Loading branch information...
1 parent 523acae commit fb9bd7b2f0608672420f9dca77de288b6fcb761a @clebertsuconic clebertsuconic committed May 17, 2011
View
@@ -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"/>
@@ -1671,19 +1671,14 @@ public boolean checkRedelivery(final MessageReference reference, final long time
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 @@ public boolean checkRedelivery(final MessageReference reference, final long time
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 expire(final Transaction tx, final MessageReference ref) throws Exc
}
}
+
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);
@@ -3748,6 +3748,7 @@ public void testExpireLargeMessageOnPaging() throws Exception
clearData();
Configuration config = createDefaultConfig();
+ config.setMessageExpiryScanPeriod(500);
config.setJournalSyncNonTransactional(false);

0 comments on commit fb9bd7b

Please sign in to comment.