Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » ejb » plugins » jms » [javadoc | source]
org.jboss.ejb.plugins.jms
public class: DLQHandler [javadoc | source]
java.lang.Object
   org.jboss.mx.util.JBossNotificationBroadcasterSupport
      org.jboss.system.ServiceMBeanSupport
         org.jboss.ejb.plugins.jms.DLQHandler

All Implemented Interfaces:
    org.jboss.kernel.spi.dependency.KernelControllerContextAware, ServiceMBean, MBeanRegistration, NotificationEmitter

Places redeliveded messages on a Dead Letter Queue.

The Dead Letter Queue handler is used to not set JBoss in an endles loop when a message is resent on and on due to transaction rollback for message receipt.

It sends message to a dead letter queue (configurable, defaults to queue/DLQ) when the message has been resent a configurable amount of times, defaults to 10.

The handler is configured through the element MDBConfig in container-invoker-conf.

The JMS property JBOSS_ORIG_DESTINATION in the resent message is set to the name of the original destination (Destionation.toString()).

The JMS property JBOSS_ORIG_MESSAGEID in the resent message is set to the id of the original message. Created: Thu Aug 23 21:17:26 2001

Nested Class Summary:
protected class  DLQHandler.DLQSynchronization  Remove a redelivered message from the DLQ's buffer when it is acknowledged 
Field Summary
public static final  String JBOSS_ORIG_DESTINATION    JMS property name holding original destination. 
public static final  String JBOSS_ORIG_MESSAGEID    JMS property name holding original JMS message id. 
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
Constructor:
 public DLQHandler(JMSProviderAdapter providerAdapter) 
Method from org.jboss.ejb.plugins.jms.DLQHandler Summary:
createService,   deleteFromBuffer,   destroyService,   handleRedeliveredMessage,   importXml,   incrementResentCount,   makeWritable,   sendMessage,   toString
Methods from org.jboss.system.ServiceMBeanSupport:
create,   createService,   destroy,   destroyService,   getDeploymentInfo,   getLog,   getName,   getNextNotificationSequenceNumber,   getObjectName,   getServer,   getServiceName,   getState,   getStateString,   jbossInternalCreate,   jbossInternalDescription,   jbossInternalDestroy,   jbossInternalLifecycle,   jbossInternalStart,   jbossInternalStop,   pojoChange,   pojoCreate,   pojoDestroy,   pojoStart,   pojoStop,   postDeregister,   postRegister,   preDeregister,   preRegister,   setKernelControllerContext,   start,   startService,   stop,   stopService,   unsetKernelControllerContext
Methods from org.jboss.mx.util.JBossNotificationBroadcasterSupport:
addNotificationListener,   getNotificationInfo,   handleNotification,   nextNotificationSequenceNumber,   removeNotificationListener,   removeNotificationListener,   sendNotification
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.ejb.plugins.jms.DLQHandler Detail:
 protected  void createService() throws Exception 
    Initalize the service.
 protected  void deleteFromBuffer(String id) 
    Delete the entry in the message counter buffer for specifyed JMS id.
 protected  void destroyService() throws Exception 
 public boolean handleRedeliveredMessage(Message msg,
    Transaction tx) 
    Check if a message has been redelivered to many times. If message has been redelivered to many times, send it to the dead letter queue (default to queue/DLQ).
 public  void importXml(Element element) throws DeploymentException 
    Takes an MDBConfig Element
 protected int incrementResentCount(String id) 
    Increment the counter for the specific JMS message id.
 protected Message makeWritable(Message msg,
    boolean trace) throws JMSException 
    Make the Message properties writable.
 protected  void sendMessage(Message msg) throws JMSException 
    Send message to the configured dead letter queue, defaults to queue/DLQ.
 public String toString()