queueSession = queueConnection.createQueueSession(transacted, acknowledgeMode);
queueSender = queueSession.createSender(queue);
Message message = createMessage(queueSession);
queueSender.send(message);
if (transacted) {
queueSession.commit();
}
} finally {
try {
queueSender.close();