topicPublisher.close();
topicSuscriber.close();
session.close();
if (!activate) {
logger.info(linkName+"|Link: "+linkName+": Terminado por bajada de connection|");
throw new ComunicationException(Origin.STOP_CONNECTION);
}
if ((currentTime - initialTime) >= (timeout*1000)) {
logger.info(linkName+"|Link: "+linkName+": Terminado por timeout|");
throw new ComunicationException(Origin.TIMEOUT);
}
} catch (NamingException e) {
logger.error(channelName+"|"+linkName+": "+e.getMessage()+"|");
} catch (JMSException e) {
logger.error(channelName+"|"+linkName+": "+e.getMessage()+"|");