rishabhdaim commented on code in PR #2936:
URL: https://github.com/apache/jackrabbit-oak/pull/2936#discussion_r3369600628


##########
oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalLoginModuleFactory.java:
##########
@@ -245,6 +260,11 @@ public LoginModule createLoginModule() {
         ExternalLoginModule lm = new ExternalLoginModule(osgiConfig);
         lm.setIdpManager(idpManager);
         lm.setSyncManager(syncManager);
+        // TODO: the monitorTracker cannot be null either (see the TODO in the 
c'tor)
+        ExternalIdentityMonitor monitor = monitorTracker != null ? 
monitorTracker.getService() : null;
+        if (monitor != null) {

Review Comment:
   When `monitorTracker.getService()` returns null (factory activated before 
the monitor OSGi service is registered), `setMonitor` is skipped and 
`initialize()` still calls `WhiteboardUtils.getService` → 
`wb.track(ExternalIdentityMonitor.class)` on every login.
   
   That leaves the Felix EventDispatcher contention path active during startup 
and whenever the monitor service is absent — partially undermining the goal of 
this change.
   
   Inject the same fallback `initialize()` uses:
   
   ```java
   lm.setMonitor(monitor != null ? monitor : ExternalIdentityMonitor.NOOP);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to