public void sendReply(IMQConnection con, Packet msg, int type,
int status, long tid, String reason, BrokerException bex, long nextTid)
{
if (fi.FAULT_INJECTION)
checkFIAfterProcess(msg.getPacketType());
Packet pkt = new Packet(con.useDirectBuffers());
pkt.setPacketType(type);
pkt.setConsumerID(msg.getConsumerID());
Hashtable hash = new Hashtable();
hash.put("JMQStatus", new Integer(status));
if (reason != null)
hash.put("JMQReason", reason);
if (tid != 0) {
hash.put("JMQTransactionID", new Long(tid));
}
if (bex != null && bex.isRemote()) {
hash.put("JMQRemote", Boolean.valueOf(true));
if (bex.getRemoteConsumerUIDs() != null) {
hash.put("JMQRemoteConsumerIDs", bex.getRemoteConsumerUIDs());
}
}
if(nextTid!=0)
hash.put("JMQNextTransactionID", new Long(nextTid));
pkt.setProperties ( hash );
con.sendControlMessage(pkt);
if (fi.FAULT_INJECTION)
checkFIAfterReply(msg.getPacketType());
}