summaryrefslogtreecommitdiffstats
path: root/base/common
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2015-06-16 14:12:54 -0400
committerEndi S. Dewata <edewata@redhat.com>2015-06-18 20:04:31 -0400
commitb9f51eb366c98647544d1d090cb9dbd0d29c6e09 (patch)
treead4bd3d43dd87e7f24200859199e90ce13f5d3f1 /base/common
parent311650625be0c8e5f42c71c7d5020e5a11ecf034 (diff)
downloadpki-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/common')
-rw-r--r--base/common/src/com/netscape/certsrv/apps/CMS.java12
-rw-r--r--base/common/src/com/netscape/certsrv/apps/ICMSEngine.java6
-rw-r--r--base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java2
3 files changed, 11 insertions, 9 deletions
diff --git a/base/common/src/com/netscape/certsrv/apps/CMS.java b/base/common/src/com/netscape/certsrv/apps/CMS.java
index e301e20ef..3ba6d7577 100644
--- a/base/common/src/com/netscape/certsrv/apps/CMS.java
+++ b/base/common/src/com/netscape/certsrv/apps/CMS.java
@@ -626,10 +626,10 @@ public final class CMS {
return _engine.getUserMessage(null /* from session context */, msgID, p1, p2, p3);
}
- public static LDAPConnection getBoundConnection(String host, int port,
+ public static LDAPConnection getBoundConnection(String id, String host, int port,
int version, LDAPSSLSocketFactoryExt fac, String bindDN,
String bindPW) throws LDAPException {
- return _engine.getBoundConnection(host, port, version, fac,
+ return _engine.getBoundConnection(id, host, port, version, fac,
bindDN, bindPW);
}
@@ -1330,9 +1330,9 @@ public final class CMS {
*
* @return bound LDAP connection pool
*/
- public static ILdapConnFactory getLdapBoundConnFactory()
+ public static ILdapConnFactory getLdapBoundConnFactory(String id)
throws ELdapException {
- return _engine.getLdapBoundConnFactory();
+ return _engine.getLdapBoundConnFactory(id);
}
/**
@@ -1340,9 +1340,9 @@ public final class CMS {
*
* @return anonymous LDAP connection pool
*/
- public static ILdapConnFactory getLdapAnonConnFactory()
+ public static ILdapConnFactory getLdapAnonConnFactory(String id)
throws ELdapException {
- return _engine.getLdapAnonConnFactory();
+ return _engine.getLdapAnonConnFactory(id);
}
/**
diff --git a/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java b/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java
index b90c73997..57c2b6cb0 100644
--- a/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java
+++ b/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java
@@ -640,9 +640,9 @@ public interface ICMSEngine extends ISubsystem {
*
* @return bound LDAP connection pool
*/
- public ILdapConnFactory getLdapBoundConnFactory() throws ELdapException;
+ public ILdapConnFactory getLdapBoundConnFactory(String id) throws ELdapException;
- 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;
@@ -651,7 +651,7 @@ public interface ICMSEngine extends ISubsystem {
*
* @return anonymous LDAP connection pool
*/
- public ILdapConnFactory getLdapAnonConnFactory() throws ELdapException;
+ public ILdapConnFactory getLdapAnonConnFactory(String id) throws ELdapException;
/**
* Retrieves the password check.
diff --git a/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java b/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java
index 24c55d086..9bf3aa24b 100644
--- a/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java
+++ b/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java
@@ -45,4 +45,6 @@ public interface ISecurityDomainSessionTable {
public long getTimeToLive();
public Enumeration<String> getSessionIds();
+
+ public void shutdown();
}