Destination d= ref.getDestination();
try {
if (ref.isDead()) {
d.removeDeadMessage(ref);
} else {
d.removeMessage(ref.getSysMessageID(),
RemoveReason.ACKNOWLEDGED);
}
} catch (Exception ex) {
Object[] eparam = {(ref == null ? "null":ref.toString()),
(d == null ? "null":d.getUniqueName()), ex.getMessage()};