use of org.mule.runtime.core.api.transaction.xa.ResourceManagerException in project mule by mulesoft.
the class TransientQueueTransactionContext method doCommit.
@Override
public void doCommit() throws ResourceManagerException {
try {
if (added != null) {
for (Map.Entry<QueueStore, List<Serializable>> entry : added.entrySet()) {
QueueStore queue = entry.getKey();
List<Serializable> queueAdded = entry.getValue();
if (queueAdded != null && queueAdded.size() > 0) {
for (Serializable object : queueAdded) {
queue.putNow(object);
}
}
}
}
} catch (Exception e) {
throw new ResourceManagerException(e);
} finally {
added = null;
removed = null;
}
}
Aggregations