|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.ejb.plugins.jms.DLQHandler
public class DLQHandler
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 (Destination.toString()) if it is present.
The JMS property JBOSS_ORIG_MESSAGEID in the resent message is set to the id of the original message.
Nested Class Summary | |
---|---|
protected class |
DLQHandler.DLQSynchronization
Remove a redelivered message from the DLQ's buffer when it is acknowledged |
Field Summary | |
---|---|
static String |
JBOSS_ORIG_DESTINATION
JMS property name holding original destination. |
static String |
JBOSS_ORIG_MESSAGEID
JMS property name holding original JMS message id. |
static String |
PROPERTY_DELIVERY_COUNT
Standard property for delivery count |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
---|
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
---|---|
DLQHandler(JMSProviderAdapter providerAdapter,
JMSContainerInvoker invoker)
|
Method Summary | |
---|---|
protected void |
createService()
|
protected void |
deleteFromBuffer(String id)
Delete the entry in the message counter buffer for specifyed JMS id. |
protected void |
destroyService()
|
boolean |
handleRedeliveredMessage(javax.jms.Message msg,
Transaction tx)
Check if a message has been redelivered to many times. |
void |
importXml(Element element)
Takes an MDBConfig Element |
protected int |
incrementResentCount(String id)
Increment the counter for the specific JMS message id. |
protected javax.jms.Message |
makeWritable(javax.jms.Message msg,
boolean trace)
Make the Message properties writable. |
void |
onException(javax.jms.JMSException e)
|
protected void |
sendMessage(javax.jms.Message msg)
Send message to the configured dead letter queue, defaults to queue/DLQ. |
protected void |
startService()
|
protected void |
stopService()
|
String |
toString()
|
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
---|
create, destroy, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_DELIVERY_COUNT
public static final String JBOSS_ORIG_DESTINATION
public static final String JBOSS_ORIG_MESSAGEID
Constructor Detail |
---|
public DLQHandler(JMSProviderAdapter providerAdapter, JMSContainerInvoker invoker)
Method Detail |
---|
public void onException(javax.jms.JMSException e)
onException
in interface javax.jms.ExceptionListener
protected void createService() throws Exception
createService
in class org.jboss.system.ServiceMBeanSupport
Exception
protected void startService() throws Exception
startService
in class org.jboss.system.ServiceMBeanSupport
Exception
protected void stopService() throws Exception
stopService
in class org.jboss.system.ServiceMBeanSupport
Exception
protected void destroyService() throws Exception
destroyService
in class org.jboss.system.ServiceMBeanSupport
Exception
public boolean handleRedeliveredMessage(javax.jms.Message msg, Transaction tx)
protected void sendMessage(javax.jms.Message msg) throws javax.jms.JMSException
javax.jms.JMSException
protected int incrementResentCount(String id)
protected void deleteFromBuffer(String id)
protected javax.jms.Message makeWritable(javax.jms.Message msg, boolean trace) throws javax.jms.JMSException
javax.jms.JMSException
public void importXml(Element element) throws org.jboss.deployment.DeploymentException
org.jboss.deployment.DeploymentException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |