From 61dac86bceb9d727e1bd707982c41ab9467c6d5a Mon Sep 17 00:00:00 2001
From: Maxim Thomas <maxim.thomas@gmail.com>
Date: Mon, 03 Nov 2025 06:30:05 +0000
Subject: [PATCH] Switch from sun.security.x509 to Bouncy Castle API (#560)
---
opendj-server-legacy/src/main/java/org/opends/server/replication/service/ReplicationDomain.java | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/service/ReplicationDomain.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/service/ReplicationDomain.java
index 0ce56d1..9c5bed7 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/service/ReplicationDomain.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/service/ReplicationDomain.java
@@ -13,6 +13,7 @@
*
* Copyright 2008-2010 Sun Microsystems, Inc.
* Portions Copyright 2011-2016 ForgeRock AS.
+ * Portions Copyright 2025 3A Systems LLC.
*/
package org.opends.server.replication.service;
@@ -39,6 +40,9 @@
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
@@ -373,6 +377,11 @@
protected volatile long generationId;
/**
+ * Thread pool for export thread tasks
+ */
+ private final ExecutorService exportThreadPool = Executors.newCachedThreadPool();
+
+ /**
* Returns the {@link CSNGenerator} that will be used to
* generate {@link CSN} for this domain.
*
@@ -879,7 +888,10 @@
// Do this work in a thread to allow replay thread continue working
ExportThread exportThread = new ExportThread(
initReqMsg.getSenderID(), initReqMsg.getInitWindow());
- exportThread.start();
+ exportThreadPool.execute(() -> {
+ Thread.currentThread().setName(exportThread.getName());
+ exportThread.run();
+ });
}
}
@@ -1075,6 +1087,9 @@
This server is not the initiator of the export so there is
nothing more to do locally.
*/
+ if (logger.isTraceEnabled()) {
+ logger.trace(LocalizableMessage.raw("[IE] got exception" + getName()), de);
+ }
}
if (logger.isTraceEnabled())
@@ -3016,6 +3031,13 @@
{
broker.stop();
}
+ try {
+ exportThreadPool.shutdown();
+ boolean timedOut = exportThreadPool.awaitTermination(100, TimeUnit.SECONDS);
+ logger.info(LocalizableMessage.raw("export pool termination timed out: " + timedOut));
+ } catch (InterruptedException e) {
+ // Give up waiting.
+ }
// Stop the listener thread
if (listenerThread != null)
--
Gitblit v1.10.0