ASF Bugzilla – Attachment 31869 Details for
Bug 56809
JMSSampler closes InitialContext too early
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix problem
jmeter.patch (text/plain), 1.53 KB, created by
Bradford Hovinen
on 2014-08-04 12:35:56 UTC
(
hide
)
Description:
Patch to fix problem
Filename:
MIME Type:
Creator:
Bradford Hovinen
Created:
2014-08-04 12:35:56 UTC
Size:
1.53 KB
patch
obsolete
>diff -ru a/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java b/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java >--- a/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java 2014-08-04 14:33:11.451584550 +0200 >+++ b/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java 2014-08-04 14:33:39.005584637 +0200 >@@ -124,6 +124,8 @@ > > private transient Throwable thrown = null; > >+ private transient Context context = null; >+ > /** > * {@inheritDoc} > */ >@@ -313,7 +315,6 @@ > public void threadStarted() { > logThreadStart(); > >- Context context = null; > thrown = null; > try { > context = getInitialContext(); >@@ -383,14 +384,6 @@ > } catch (NoClassDefFoundError e) { > thrown = e; > LOGGER.error(e.getLocalizedMessage(), e); >- } finally { >- if (context != null) { >- try { >- context.close(); >- } catch (NamingException ignored) { >- // ignore >- } >- } > } > } > >@@ -468,6 +461,14 @@ > public void threadFinished() { > LOGGER.debug("Thread ended " + new Date()); > >+ if (context != null) { >+ try { >+ context.close(); >+ } catch (NamingException ignored) { >+ // ignore >+ } >+ } >+ > Utils.close(session, LOGGER); > Utils.close(connection, LOGGER); > if (receiverThread != null) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 56809
: 31869