cxn = checkConnectionId(connectionId, "fetchMessage");
session = checkSessionId(sessionId, "fetchMessage");
SessionListener slistener = SessionListener.getListener(session.getSessionUID());
ConsumerUID conUID;
try {
conUID = new ConsumerUID(consumerId);
msg = slistener.getNextConsumerPacket(conUID, timeout);
if ((msg != null) && acknowledge) {
TransactionUID txnUID = null;
if (transactionId != 0) {
txnUID = new TransactionUID(transactionId);
}
SysMessageID ids[] = new SysMessageID[1];
ids[0] = ((Packet)msg).getSysMessageID();
ConsumerUID cids[] = new ConsumerUID[1];
cids[0] = conUID;
Globals.getProtocol().acknowledge(cxn, txnUID, false, AckHandler.ACKNOWLEDGE_REQUEST, null, null, 0, ids, cids);
}
} catch(Exception e) {
HashMap props = new HashMap();