FileDocCategorySizeDatePackage
JBossMQDLQHandler.javaAPI DocJBoss 4.2.12663Fri Jul 13 21:01:16 BST 2007org.jboss.resource.adapter.jms.inflow.dlq

JBossMQDLQHandler

public class JBossMQDLQHandler extends AbstractDLQHandler
A DLQ Handler that knows about JBossMQ redelivery properties
author
Adrian Brock
version
$Revision: 57189 $

Fields Summary
protected static final String
JMS_JBOSS_REDELIVERY_COUNT
Properties copied from org.jboss.mq.SpyMessage
protected static final String
JMS_JBOSS_REDELIVERY_LIMIT
Properties copied from org.jboss.mq.SpyMessage
protected int
maxResent
The maximum number of resends
Constructors Summary
Methods Summary
protected booleanhandleDelivery(javax.jms.Message msg)

      int max = maxResent;
      try
      {
         if (msg.propertyExists(JMS_JBOSS_REDELIVERY_LIMIT))
            max = msg.getIntProperty(JMS_JBOSS_REDELIVERY_LIMIT);

         if (msg.propertyExists(JMS_JBOSS_REDELIVERY_COUNT))
         {
            int count = msg.getIntProperty(JMS_JBOSS_REDELIVERY_COUNT);
         
            if (count > max)
            {
               warnDLQ(msg, count, max);
               return true;
            }
         }
      }
      catch (Throwable t)
      {
         log.warn("Unexpected error retrieving message properties " + msg, t);
      }
      return false;
   
public voidsetup(org.jboss.resource.adapter.jms.inflow.JmsActivation activation, javax.naming.Context ctx)


          
   
      super.setup(activation, ctx);
      maxResent = activation.getActivationSpec().getDLQMaxResent();