Hello,
After having read the patch guidelines at
http://jakarta.apache.org/site/source.html#Patches, I am re-submitting this patch for
the disconnection behavior on LdapClient.java.
This patch forces disconnection on the disconnect() method, instead of waiting for
Java garbage collection. This patch is based on the latest CVS version. Please
consider this patch for inclusion in future builds. The current behavior is not
acceptable for extended test durations.
Kayne McGladrey
Member - Technical Group
AT&T Wireless
--- jmeter_cvs/LdapClient.java 2003-11-03 15:54:34.000000000 -0800
+++
jakarta-jmeter-1.9.1/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LdapClient.java
2003-11-03 16:10:16.000000000 -0800
@@ -115,14 +115,12 @@
/**
* Disconnect from the server.
*/
- public void disconnect()
- {
- try
- {
- dirContext=null;
- }
- catch (Exception e)
- {
+ public void disconnect() {
+ try {
+ dirContext.close();
+ Runtime.getRuntime().gc();
+ Runtime.getRuntime().runFinalization();
+ } catch (Exception e) {
log.error("Ldap client - ",e);
}
}
@@ -175,4 +173,4 @@
{
dirContext.destroySubcontext(string);
}
-}
\ No newline at end of file
+}