String consumerId,
String messageSelector)
throws JMSException
{
int pos = consumerId.lastIndexOf("@");
XcpMessage message = new XcpMessage(consumerId.substring(0, pos),
XcpMessage.ACTION_REGISTER_DUR,
dest.getName(),
consumerId);
message.setMessageSelector(messageSelector);
message.setSubscriberName(name + "@" + ID_SUFFIX);
XcpResponse resp = null;
try {
resp = this.sender.send(message, new XcpMessageHandler());
} catch(java.io.IOException ex) {
JMSException jmsx = new JMSException(ex.getMessage());
jmsx.setLinkedException(ex);
throw jmsx;
}
XcpMessage msg = (XcpMessage)resp.getRootElement();
return msg.getConsumerId();
}