[jboss-svn-commits] JBL Code SVN: r15058 - labs/jbossesb/trunk/product/samples/quickstarts/deadletter/src/org/jboss/soa/esb/samples/quickstart/deadletter.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Sep 12 12:37:46 EDT 2007


Author: kevin.conner at jboss.com
Date: 2007-09-12 12:37:46 -0400 (Wed, 12 Sep 2007)
New Revision: 15058

Modified:
   labs/jbossesb/trunk/product/samples/quickstarts/deadletter/src/org/jboss/soa/esb/samples/quickstart/deadletter/MyFailingSyncAction.java
Log:
Reverted to DLQ: JBESB-1030

Modified: labs/jbossesb/trunk/product/samples/quickstarts/deadletter/src/org/jboss/soa/esb/samples/quickstart/deadletter/MyFailingSyncAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/deadletter/src/org/jboss/soa/esb/samples/quickstart/deadletter/MyFailingSyncAction.java	2007-09-12 16:29:51 UTC (rev 15057)
+++ labs/jbossesb/trunk/product/samples/quickstarts/deadletter/src/org/jboss/soa/esb/samples/quickstart/deadletter/MyFailingSyncAction.java	2007-09-12 16:37:46 UTC (rev 15058)
@@ -66,9 +66,9 @@
         
         try {
             //empty out the DLQ
-            Map<URI, Message> messageMap = ms.getAllMessages(MessageStore.CLASSIFICATION_RDLVR);
+            Map<URI, Message> messageMap = ms.getAllMessages(MessageStore.CLASSIFICATION_DLQ);
             for (URI key : messageMap.keySet()) {
-                ms.removeMessage(key, MessageStore.CLASSIFICATION_RDLVR);
+                ms.removeMessage(key, MessageStore.CLASSIFICATION_DLQ);
             }
             Service noneExistingService = new Service("none-exising-category", "none-existing-service-name");
             ServiceInvoker si = new ServiceInvoker(noneExistingService);
@@ -79,7 +79,7 @@
             //Adding this control code to show where the message now is.
             //We should get here on and we should have a message in the DLQ.
             try {
-                Map<URI, Message> messageMap = ms.getAllMessages(MessageStore.CLASSIFICATION_RDLVR);
+                Map<URI, Message> messageMap = ms.getAllMessages(MessageStore.CLASSIFICATION_DLQ);
                 while (messageMap.size() == 0) { //we may have to wait for the DLQ Service to act.
                     logger.info("...Waiting for the DLQ Service to act.");
                     try {
@@ -87,17 +87,15 @@
                     } catch (InterruptedException ie) {
                         logger.error(ie);
                     }
-                    messageMap = ms.getAllMessages(MessageStore.CLASSIFICATION_RDLVR);
+                    messageMap = ms.getAllMessages(MessageStore.CLASSIFICATION_DLQ);
                 }
                 for (URI key : messageMap.keySet()) {
                     Message dlqMessage = messageMap.get(key);
                     logger.info("*******************************");
-                    logger.info("Message in the RDLVR queue should be the same message: " + message.getBody().toString().equals(dlqMessage.getBody().toString()));
+                    logger.info("Message in the DLQ queue should be the same message: " + message.getBody().toString().equals(dlqMessage.getBody().toString()));
                     logger.info("Message=" + message.getBody());
                     logger.info("dlqMessage=" + dlqMessage.getBody());
                     logger.info("*******************************");
-                    logger.info("Removing message to avoid future redeliveries");
-                    ms.removeMessage(key, MessageStore.CLASSIFICATION_RDLVR);
                 }
             } catch (MessageStoreException mse) {
                 throw new ActionProcessingException(mse.getMessage(), mse);




More information about the jboss-svn-commits mailing list