Author: clebert.suconic(a)jboss.com
Date: 2009-11-19 20:17:02 -0500 (Thu, 19 Nov 2009)
New Revision: 8327
Modified:
branches/ClebertTemporary/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
removing another recursive IO
Modified: branches/ClebertTemporary/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
---
branches/ClebertTemporary/src/main/org/hornetq/core/server/impl/QueueImpl.java 2009-11-20
01:00:17 UTC (rev 8326)
+++
branches/ClebertTemporary/src/main/org/hornetq/core/server/impl/QueueImpl.java 2009-11-20
01:17:02 UTC (rev 8327)
@@ -1463,7 +1463,7 @@
private void postAcknowledge(final MessageReference ref)
{
- ServerMessage message = ref.getMessage();
+ final ServerMessage message = ref.getMessage();
QueueImpl queue = (QueueImpl)ref.getQueue();
@@ -1485,14 +1485,23 @@
// also note then when this happens as part of a trasaction its the tx commt
of the ack that is important
// not this
- try
+
+ // and this has to happen in a different thread
+
+ journalExecutor.execute(new Runnable()
{
- storageManager.deleteMessage(message.getMessageID());
- }
- catch (Exception e)
- {
- log.warn("Unable to remove message id = " +
message.getMessageID() + " please remove manually");
- }
+ public void run()
+ {
+ try
+ {
+ storageManager.deleteMessage(message.getMessageID());
+ }
+ catch (Exception e)
+ {
+ log.warn("Unable to remove message id = " +
message.getMessageID() + " please remove manually");
+ }
+ }
+ });
}
}