for (LocalQueueTxJournalEntry logEntry : entries)
{
if (logEntry.isRemove())
{
String queueName = logEntry.getQueueName();
RecoverableQueueStore queue = queueProvider.getRecoveryQueue(queueName);
Serializable polledValue = logEntry.getValue();
if (!queue.contains(polledValue))
{
if (logger.isDebugEnabled())
{
logger.debug("re-adding polled element that was not commited to queue " + queue.getName());
}
try
{
queue.putNow(polledValue);
}
catch (InterruptedException e)
{
throw new MuleRuntimeException(e);
}
}
}
else if (logEntry.isAdd() || logEntry.isAddFirst())
{
Serializable offeredValue = logEntry.getValue();
String queueName = logEntry.getQueueName();
RecoverableQueueStore queue = queueProvider.getRecoveryQueue(queueName);
if (queue.contains(offeredValue))
{
if (logger.isDebugEnabled())
{
logger.debug("removing offer element that was not commited to queue " + queue.getName());
}
queue.remove(offeredValue);
}
}
}
}
if (logger.isDebugEnabled())