protected synchronized void onStop() throws DiscoveryException {
try {
receiverSession.close();
} catch (JMSException ex) {
throw new DiscoveryException(ex);
} finally {
try {
connection.close();
} catch (JMSException ex) {
throw new DiscoveryException(ex);
}
}
}