diff options
author | Endi S. Dewata <edewata@redhat.com> | 2015-06-16 14:12:54 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2015-06-18 20:04:31 -0400 |
commit | b9f51eb366c98647544d1d090cb9dbd0d29c6e09 (patch) | |
tree | ad4bd3d43dd87e7f24200859199e90ce13f5d3f1 /base/server/cmscore/src/com/netscape/cmscore/apps/CMSEngine.java | |
parent | 311650625be0c8e5f42c71c7d5020e5a11ecf034 (diff) | |
download | pki-b9f51eb366c98647544d1d090cb9dbd0d29c6e09.tar.gz pki-b9f51eb366c98647544d1d090cb9dbd0d29c6e09.tar.xz pki-b9f51eb366c98647544d1d090cb9dbd0d29c6e09.zip |
Fixed thread leaks during shutdown.
Various codes have been modified to properly stop threads during
shutdown. A new ID attribute has been added to the LDAP connection
factory classes to help identify leaking threads.
https://fedorahosted.org/pki/ticket/1327
Diffstat (limited to 'base/server/cmscore/src/com/netscape/cmscore/apps/CMSEngine.java')
-rw-r--r-- | base/server/cmscore/src/com/netscape/cmscore/apps/CMSEngine.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/base/server/cmscore/src/com/netscape/cmscore/apps/CMSEngine.java b/base/server/cmscore/src/com/netscape/cmscore/apps/CMSEngine.java index 02c8ab41d..fa2c8147f 100644 --- a/base/server/cmscore/src/com/netscape/cmscore/apps/CMSEngine.java +++ b/base/server/cmscore/src/com/netscape/cmscore/apps/CMSEngine.java @@ -976,14 +976,14 @@ public class CMSEngine implements ICMSEngine { return new LdapAuthInfo(); } - public ILdapConnFactory getLdapBoundConnFactory() + public ILdapConnFactory getLdapBoundConnFactory(String id) throws ELdapException { - return new LdapBoundConnFactory(); + return new LdapBoundConnFactory(id); } - public ILdapConnFactory getLdapAnonConnFactory() + public ILdapConnFactory getLdapAnonConnFactory(String id) throws ELdapException { - return new LdapAnonConnFactory(); + return new LdapAnonConnFactory(id); } public IRequestEncoder getHttpRequestEncoder() { @@ -1079,7 +1079,7 @@ public class CMSEngine implements ICMSEngine { } } - public LDAPConnection getBoundConnection(String host, int port, + public LDAPConnection getBoundConnection(String id, String host, int port, int version, LDAPSSLSocketFactoryExt fac, String bindDN, String bindPW) throws LDAPException { return new LdapBoundConnection(host, port, version, fac, @@ -1796,6 +1796,14 @@ public class CMSEngine implements ICMSEngine { shutdownSubsystems(mFinalSubsystems); shutdownSubsystems(mDynSubsystems); shutdownSubsystems(mStaticSubsystems); + + if (mSDTimer != null) { + mSDTimer.cancel(); + } + + if (mSecurityDomainSessionTable != null) { + mSecurityDomainSessionTable.shutdown(); + } } /** |