Code sample for sending a handshake request
The external client must use the
setJMSReplyTo() method to specify its reply-to queue in
the handshake request message header sent to Gateway. A sample send() method
is shown:
public void send(String text) throws JMSException {
TextMessage message = null;
try {
message = queueSession.createTextMessage(text);
Queue replyToQueue = queueSession.createQueue("CL1Response_qalias");
message.setJMSReplyTo(replyToQueue);
queueSender.send(message);
} catch (JMSException e) {
e.printStackTrace();
} finally {
if (queueSession!=null) {
queueSession.commit();
}
if (queueSender!=null) {
queueSender.close();
}
if (queueSession!=null) {
queueSession.close();
}
if (queueConn!=null) {
queueConn.close();
}
}
}