} catch (XMPPException e) {
log.error("Error occurred while sending the message : "+message.toXML(),e);
handleException("Error occurred while sending the message : "+message.toXML(),e);
} catch (InterruptedException e) {
log.error("Error occurred while sending the message : "+message.toXML(),e);
handleException("Error occurred while sending the message : "+message.toXML(),e);
}finally{
// if(xmppConnection != null && !msgCtx.isServerSide()){
// xmppConnection.disconnect();
// }