", cids="+cids+", validate="+validate+", deadComment="+deadComment+
", deliverCnt="+deliverCnt+", exception="+exception);
}
List cleanList = null;
AckHandler handler = (AckHandler)
pr.getHandler(PacketType.ACKNOWLEDGE);
if (validate) {
if (ackType == handler.DEAD_REQUEST ||
ackType == handler.UNDELIVERABLE_REQUEST) {
throw new BrokerException("Can not use JMQValidate with"
+ " an ackType of " + ackType,
null,
Status.BAD_REQUEST);
} else if (tid == null) {
throw new BrokerException("Can not use JMQValidate with"
+ " no tid",
null,
Status.BAD_REQUEST);
} else if (!handler.validateMessages(tid, ids, cids)) {
throw new BrokerException("Acknowledgement could not be found",
null,
Status.NOT_FOUND);
}
} else if (ackType == handler.DEAD_REQUEST) {
cleanList = handler.handleDeadMsgs(con, ids, cids,
handler.DEAD_REASON_UNDELIVERABLE,
exception, deadComment, deliverCnt);
} else if (ackType == handler.UNDELIVERABLE_REQUEST) {
cleanList = handler.handleUndeliverableMsgs(con, ids, cids);
} else if (tid != null) {
cleanList = handler.handleTransaction(con, tid, ids, cids);
} else {
cleanList = handler.handleAcks(con, ids, cids, true); //XXX ackack flag
}
// cleanup
handler.cleanUp(cleanList);
}