private void subscribe(String[] toAck) throws JMSException {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(
BasicLevel.DEBUG, "MessageConsumerListener.subscribe()");
ConsumerSetListRequest req =
new ConsumerSetListRequest(
targetName,
selector,
queueMode,
toAck,
queueMessageReadMax);
// Change the receive status before sending
// the request. subscribe() is not synchronized
// so the reply can be received before the end
// of this method.
setReceiveStatus(ReceiveStatus.WAIT_FOR_REPLY);
rm.sendRequest(req, this);
requestId = req.getRequestId();
}