Java Doc for DLQHandler.java in  » EJB-Server-JBoss-4.2.1 » server » org » jboss » ejb » plugins » jms » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » server » org.jboss.ejb.plugins.jms 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jboss.ejb.plugins.jms.DLQHandler

DLQHandler
public class DLQHandler extends ServiceMBeanSupport implements ExceptionListener(Code)
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.
author:
   Jason Dillon
author:
   Scott.Stark@jboss.org
author:
   Adrian Brock
version:
   $Revision: 57209 $


Inner Class :protected class DLQSynchronization implements Synchronization

Field Summary
final public static  StringJBOSS_ORIG_DESTINATION
     JMS property name holding original destination.
final public static  StringJBOSS_ORIG_MESSAGEID
     JMS property name holding original JMS message id.
final public static  StringPROPERTY_DELIVERY_COUNT
    

Constructor Summary
public  DLQHandler(JMSProviderAdapter providerAdapter, JMSContainerInvoker invoker)
    

Method Summary
protected  voidcreateService()
    
protected  voiddeleteFromBuffer(String id)
     Delete the entry in the message counter buffer for specifyed JMS id.
protected  voiddestroyService()
    
public  booleanhandleRedeliveredMessage(Message msg, Transaction tx)
     Check if a message has been redelivered to many times.
public  voidimportXml(Element element)
    
protected  intincrementResentCount(String id)
     Increment the counter for the specific JMS message id.
protected  MessagemakeWritable(Message msg, boolean trace)
     Make the Message properties writable.
public  voidonException(JMSException e)
    
protected  voidsendMessage(Message msg)
     Send message to the configured dead letter queue, defaults to queue/DLQ.
protected  voidstartService()
    
protected  voidstopService()
    
public  StringtoString()
    

Field Detail
JBOSS_ORIG_DESTINATION
final public static String JBOSS_ORIG_DESTINATION(Code)
JMS property name holding original destination.



JBOSS_ORIG_MESSAGEID
final public static String JBOSS_ORIG_MESSAGEID(Code)
JMS property name holding original JMS message id.



PROPERTY_DELIVERY_COUNT
final public static String PROPERTY_DELIVERY_COUNT(Code)
Standard property for delivery count




Constructor Detail
DLQHandler
public DLQHandler(JMSProviderAdapter providerAdapter, JMSContainerInvoker invoker)(Code)




Method Detail
createService
protected void createService() throws Exception(Code)



deleteFromBuffer
protected void deleteFromBuffer(String id)(Code)
Delete the entry in the message counter buffer for specifyed JMS id.



destroyService
protected void destroyService() throws Exception(Code)



handleRedeliveredMessage
public boolean handleRedeliveredMessage(Message msg, Transaction tx)(Code)
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). true if message is handled (i.e resent), false if not.



importXml
public void importXml(Element element) throws DeploymentException(Code)
Takes an MDBConfig Element



incrementResentCount
protected int incrementResentCount(String id)(Code)
Increment the counter for the specific JMS message id. the new counter value.



makeWritable
protected Message makeWritable(Message msg, boolean trace) throws JMSException(Code)
Make the Message properties writable. the writable message.



onException
public void onException(JMSException e)(Code)



sendMessage
protected void sendMessage(Message msg) throws JMSException(Code)
Send message to the configured dead letter queue, defaults to queue/DLQ.



startService
protected void startService() throws Exception(Code)



stopService
protected void stopService() throws Exception(Code)



toString
public String toString()(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.