I have a method postMessageToJms() which checks if there is a connection, if there is it will try to send a message. If any error occur while sending message, t
postMessageToJms()