if (jmsTemplate != null) {
jmsTemplate.convertAndSend(finalJson.toString());
CachingConnectionFactory ccf = (CachingConnectionFactory) this.jmsTemplate.getConnectionFactory();
- ccf.destroy();
+ if (ccf != null) {
+ ccf.destroy();
+ }
}
}
if (jmsTemplate != null) {
jmsTemplate.convertAndSend(msg);
CachingConnectionFactory ccf = (CachingConnectionFactory) this.jmsTemplate.getConnectionFactory();
- ccf.destroy();
+ if (ccf != null) {
+ ccf.destroy();
+ }
}
}
}