Lines 124-129
Link Here
|
124 |
|
124 |
|
125 |
private transient Throwable thrown = null; |
125 |
private transient Throwable thrown = null; |
126 |
|
126 |
|
|
|
127 |
private transient Context context = null; |
128 |
|
127 |
/** |
129 |
/** |
128 |
* {@inheritDoc} |
130 |
* {@inheritDoc} |
129 |
*/ |
131 |
*/ |
Lines 313-319
Link Here
|
313 |
public void threadStarted() { |
315 |
public void threadStarted() { |
314 |
logThreadStart(); |
316 |
logThreadStart(); |
315 |
|
317 |
|
316 |
Context context = null; |
|
|
317 |
thrown = null; |
318 |
thrown = null; |
318 |
try { |
319 |
try { |
319 |
context = getInitialContext(); |
320 |
context = getInitialContext(); |
Lines 383-396
Link Here
|
383 |
} catch (NoClassDefFoundError e) { |
384 |
} catch (NoClassDefFoundError e) { |
384 |
thrown = e; |
385 |
thrown = e; |
385 |
LOGGER.error(e.getLocalizedMessage(), e); |
386 |
LOGGER.error(e.getLocalizedMessage(), e); |
386 |
} finally { |
|
|
387 |
if (context != null) { |
388 |
try { |
389 |
context.close(); |
390 |
} catch (NamingException ignored) { |
391 |
// ignore |
392 |
} |
393 |
} |
394 |
} |
387 |
} |
395 |
} |
388 |
} |
396 |
|
389 |
|
Lines 468-473
Link Here
|
468 |
public void threadFinished() { |
461 |
public void threadFinished() { |
469 |
LOGGER.debug("Thread ended " + new Date()); |
462 |
LOGGER.debug("Thread ended " + new Date()); |
470 |
|
463 |
|
|
|
464 |
if (context != null) { |
465 |
try { |
466 |
context.close(); |
467 |
} catch (NamingException ignored) { |
468 |
// ignore |
469 |
} |
470 |
} |
471 |
|
471 |
Utils.close(session, LOGGER); |
472 |
Utils.close(session, LOGGER); |
472 |
Utils.close(connection, LOGGER); |
473 |
Utils.close(connection, LOGGER); |
473 |
if (receiverThread != null) { |
474 |
if (receiverThread != null) { |