// If the forward comes from a son, forwarding it to the father, if any.
if (not.fromCluster && fatherId != null)
forward(fatherId, not);
// Sending the received messages to the foreign JMS destination:
Message message;
DMQManager dmqManager = null;
for (Iterator msgs = not.messages.getMessages().iterator(); msgs.hasNext();) {
// AF: TODO it seems not useful to transform the message !!
message = new Message((org.objectweb.joram.shared.messages.Message) msgs.next());
message.order = arrivalsCounter++;
outTable.put(message.getIdentifier(), message);
try {
jmsModule.send(message.getFullMessage());
} catch (Exception exc) {
outTable.remove(message.getIdentifier());
if (dmqManager == null) {
dmqManager = new DMQManager(dmqId, getId());
}
nbMsgsSentToDMQSinceCreation++;
dmqManager.addDeadMessage(message.getFullMessage(), MessageErrorConstants.UNEXPECTED_ERROR);
}
}
if (dmqManager != null) {
dmqManager.sendToDMQ();
}