}
while ( connecting.get() && running ) {
try {
connection = adapter.makeConnection(activationSpec);
connection.setExceptionListener(new ExceptionListener() {
public void onException(JMSException error) {
if (!serverSessionPool.isClosing()) {
// initiate reconnection only once, i.e. on initial exception
// and only if not already trying to connect
LOG.error("Connection to broker failed: " + error.getMessage(), error);