summaryrefslogtreecommitdiffstats
path: root/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
diff options
context:
space:
mode:
authorawnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2008-08-08 23:24:30 +0000
committerawnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2008-08-08 23:24:30 +0000
commitaaa35dbdebda39fb9cac66fb3dee705b6701bd9f (patch)
tree43ba7c74e82cf9f012a7cc2b92bca040885dd497 /pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
parent0fc6258f25c8444185853724514afdc282041501 (diff)
downloadpki-aaa35dbdebda39fb9cac66fb3dee705b6701bd9f.tar.gz
pki-aaa35dbdebda39fb9cac66fb3dee705b6701bd9f.tar.xz
pki-aaa35dbdebda39fb9cac66fb3dee705b6701bd9f.zip
Fix for bug #453834.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@106 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/ca/src/com/netscape/ca/CertificateAuthority.java')
-rw-r--r--pki/base/ca/src/com/netscape/ca/CertificateAuthority.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
index e78d2607a..151b15ccf 100644
--- a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
+++ b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java
@@ -221,6 +221,27 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
return mPolicy.getPolicyProcessor();
}
+ private int getMaxNumberOfPublishingThreads() {
+ int maxNumberOfPublishingThreads = 0;
+
+ if (mPublisherProcessor != null && mPublisherProcessor.enabled()) {
+ ILdapConnModule ldapConnModule = ldapConnModule = mPublisherProcessor.getLdapConnModule();
+ if (ldapConnModule != null) {
+ ILdapConnFactory ldapConnFactory = ldapConnModule.getLdapConnFactory();
+ if (ldapConnFactory != null) {
+ int maxNumberOfPublishingConnections = ldapConnFactory.maxConn();
+ if (mCRLIssuePoints != null && mCRLIssuePoints.size() > 1) {
+ maxNumberOfPublishingThreads = maxNumberOfPublishingConnections - mCRLIssuePoints.size();
+ } else {
+ maxNumberOfPublishingThreads = maxNumberOfPublishingConnections - 1;
+ }
+ CMS.debug("Maximum number of publishing threads = " + maxNumberOfPublishingThreads);
+ }
+ }
+ }
+ return maxNumberOfPublishingThreads;
+ }
+
/**
* Initializes this CA subsystem.
* <P>
@@ -299,6 +320,8 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
// note CRL framework depends on DBS, CRYPTO and PUBLISHING
// being functional.
initCRL();
+
+ mNotify.setMaxNumberOfPublishingThreads(getMaxNumberOfPublishingThreads());
} catch (EBaseException e) {
if (CMS.isPreOpMode())
return;
@@ -1502,7 +1525,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori
}
}
CMS.debug("CA Publishing Queue Enabled: "+enablePublishingQueue+" Priority Level: "+publishingQueuePriorityLevel);
- mNotify = new ARequestNotifier(this, enablePublishingQueue, publishingQueuePriorityLevel);
+ mNotify = new ARequestNotifier(enablePublishingQueue, publishingQueuePriorityLevel);
CMS.debug("CA notifier inited");
mPNotify = new ARequestNotifier();
CMS.debug("CA pending notifier inited");