Author: jmesnil
Date: 2009-12-01 03:37:11 -0500 (Tue, 01 Dec 2009)
New Revision: 8474
Modified:
trunk/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
Log:
in PostOffice.route(), set the message's PagingStore before detecting duplicated
message
Modified: trunk/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2009-12-01
02:55:31 UTC (rev 8473)
+++ trunk/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2009-12-01
08:37:11 UTC (rev 8474)
@@ -554,6 +554,8 @@
SimpleString address = message.getDestination();
+ setPagingStore(message);
+
Object duplicateID =
message.getObjectProperty(MessageImpl.HDR_DUPLICATE_DETECTION_ID);
DuplicateIDCache cache = null;
@@ -577,11 +579,11 @@
{
if (context.getTransaction() == null)
{
- log.trace("Duplicate message detected - message will not be
routed");
+ log.warn("Duplicate message detected - message will not be
routed");
}
else
{
- log.trace("Duplicate message detected - transaction will be
rejected");
+ log.warn("Duplicate message detected - transaction will be
rejected");
context.getTransaction().markAsRollbackOnly(null);
}
@@ -608,8 +610,6 @@
cache.addToCache(duplicateIDBytes, context.getTransaction());
}
- setPagingStore(message);
-
if (context.getTransaction() == null)
{
if (message.page(true))
@@ -837,18 +837,9 @@
// Private -----------------------------------------------------------------
- private void generateID(final ServerMessage message)
- {
- // Setting the ID for the routed message
- long id = storageManager.generateUniqueID();
-
- message.setMessageID(id);
- }
-
private void setPagingStore(final ServerMessage message) throws Exception
{
PagingStore store = pagingManager.getPageStore(message.getDestination());
-
message.setPagingStore(store);
}
Show replies by date