[java-shib-shared] branch main updated: JSSH-71 Remove the impact of the DestructableComponent Interface

Codeberg noreply at shibboleth.net
Wed Aug 5 13:09:57 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository java-shib-shared.

View the commit online:
https://codeberg.org/Shibboleth/java-shib-shared/commit/7e2a9d3266e1c83ca8a4432e628f0d7361210624

The following commit(s) were added to refs/heads/main by this push:
     new 7e2a9d32 JSSH-71 Remove the impact of the DestructableComponent Interface
7e2a9d32 is described below

commit 7e2a9d3266e1c83ca8a4432e628f0d7361210624
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Aug 5 13:43:10 2026 +0100

    JSSH-71 Remove the impact of the DestructableComponent Interface
    
    https://shibboleth.atlassian.net/browse/JSSH-71
    
    With a BeanTearDownProcessor in global-system.xml  AbstractReloadableService,
    can now rely on the annotation.
---
 .../shared/service/AbstractReloadableService.java    | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/shib-service/src/main/java/net/shibboleth/shared/service/AbstractReloadableService.java b/shib-service/src/main/java/net/shibboleth/shared/service/AbstractReloadableService.java
index 50ca7bb1..00a8e589 100644
--- a/shib-service/src/main/java/net/shibboleth/shared/service/AbstractReloadableService.java
+++ b/shib-service/src/main/java/net/shibboleth/shared/service/AbstractReloadableService.java
@@ -24,6 +24,7 @@ import javax.annotation.Nullable;
 
 import org.slf4j.Logger;
 
+import net.shibboleth.shared.annotation.OnTeardown;
 import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent;
 import net.shibboleth.shared.component.ComponentInitializationException;
@@ -32,6 +33,7 @@ import net.shibboleth.shared.logic.Constraint;
 import net.shibboleth.shared.primitive.AnnotationsSupport;
 import net.shibboleth.shared.primitive.LoggerFactory;
 import net.shibboleth.shared.primitive.TimerSupport;
+import net.shibboleth.shared.spring.config.BeanTearDownProcessor;
 
 /**
  * Base class for {@link ReloadableService}. This base class will use a background thread that will perform a periodic
@@ -203,12 +205,13 @@ public abstract class AbstractReloadableService<T> extends AbstractIdentifiableI
         }
     }
 
-    /** {@inheritDoc} */
-    @Override @Deprecated protected void doDestroy() {
-        /* V6 code note.  This is a "top level object so the annotation serves no purpose
-         * (it wont be inside another service).  The V6 implementation could implement
-         * Disposable bean (and override destroy).
-         */
+    /**
+     * Tear down point for services.  <p>These beans are usually outter level and there
+     * is a {@link BeanTearDownProcessor} declared global-system.xml which will cause this
+     * to be called. 
+     */
+    @OnTeardown
+    public final void teardownAbstractReloadableService() {
         log.info("{} Starting shutdown", getLogPrefix());
         AnnotationsSupport.callOnTeardownAnnotations(this);
         if (reloadTask != null) {
@@ -219,10 +222,9 @@ public abstract class AbstractReloadableService<T> extends AbstractIdentifiableI
             internalTaskTimer.cancel();
         }
         internalTaskTimer = null;
-        log.info("{} Completing shutdown", getLogPrefix());
-        super.doDestroy();
+        log.info("{} Completing shutdown", getLogPrefix());        
     }
-
+    
     /** {@inheritDoc} */
     @Override public final void reload() {
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list