Skip to content

Commit 4da8623

Browse files
committed
Fix Monitoring Service startup
The Monitoring Service was not starting due to some missing CTS Guice dependencies. This patch exposes `Debug`, `CTSOperationsMonitoringStore` and `CTSReaperMonitoringStore` instances so they are available in the impacted classes from the package `org.forgerock.openam.monitoring.cts`. Additionally, unused imports have been removed and an incorrect comment block style was updated to improve clarity.
1 parent 0abef93 commit 4da8623

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

openam-core/src/main/java/org/forgerock/openam/cts/CoreTokenServiceGuiceModule.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
* information: "Portions copyright [year] [name of copyright owner]".
1313
*
1414
* Copyright 2016 ForgeRock AS.
15+
* Portions copyright 2025 Wren Security.
1516
*/
1617
package org.forgerock.openam.cts;
1718

18-
import java.io.Closeable;
1919
import java.util.Arrays;
2020
import java.util.Map;
2121
import java.util.concurrent.ExecutorService;
@@ -55,7 +55,6 @@
5555
import org.forgerock.openam.sm.datalayer.api.DataLayerConstants;
5656
import org.forgerock.openam.sm.datalayer.api.DataLayerException;
5757
import org.forgerock.openam.sm.datalayer.api.QueueConfiguration;
58-
import org.forgerock.opendj.ldap.Connection;
5958
import org.forgerock.util.Option;
6059

6160
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -125,7 +124,7 @@ public ConfigurationObserver get() {
125124
// Enable monitoring of all CTS operations
126125
bind(ResultHandlerFactory.class).to(MonitoredResultHandlerFactory.class);
127126

128-
/**
127+
/*
129128
* Core Token Service bindings are divided into a number of logical groups.
130129
*/
131130
MapBinder<Option<?>, LdapOptionFunction> optionFunctionMapBinder = MapBinder.newMapBinder(binder(),
@@ -136,9 +135,12 @@ public ConfigurationObserver get() {
136135

137136
expose(Debug.class).annotatedWith(Names.named(CoreTokenConstants.CTS_DEBUG));
138137
expose(Debug.class).annotatedWith(Names.named(CoreTokenConstants.CTS_ASYNC_DEBUG));
138+
expose(Debug.class).annotatedWith(Names.named(CoreTokenConstants.CTS_MONITOR_DEBUG));
139139
expose(new TypeLiteral<Map<Option<?>, LdapOptionFunction>>() {});
140140
expose(CoreTokenConfig.class);
141141
expose(CTSPersistentStore.class);
142+
expose(CTSOperationsMonitoringStore.class);
143+
expose(CTSReaperMonitoringStore.class);
142144
expose(CTSConnectionMonitoringStore.class);
143145
expose(ExecutorService.class).annotatedWith(Names.named(CoreTokenConstants.CTS_WORKER_POOL));
144146
expose(ObjectMapper.class).annotatedWith(Names.named(CoreTokenConstants.OBJECT_MAPPER));

0 commit comments

Comments
 (0)