[java-shib-shared] 09/09: Wip

Codeberg noreply at shibboleth.net
Mon Jul 6 15:29:36 UTC 2026


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

codeberg pushed a commit to branch dev/JSSH-71-old
in repository java-shib-shared.

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

commit a585ceb94c91d3c522747b9648cdea13b82d7200
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Jul 6 13:18:06 2026 +0100

    Wip
---
 .../shared/spring/service/AbstractServiceableComponent.java    |  9 +++++++++
 .../shared/component/AbstractInitializableComponent.java       | 10 +++++-----
 .../net/shibboleth/shared/component/DestructableComponent.java |  4 ++--
 3 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/shib-service/src/main/java/net/shibboleth/shared/spring/service/AbstractServiceableComponent.java b/shib-service/src/main/java/net/shibboleth/shared/spring/service/AbstractServiceableComponent.java
index a4e8780b..0cd3085f 100644
--- a/shib-service/src/main/java/net/shibboleth/shared/spring/service/AbstractServiceableComponent.java
+++ b/shib-service/src/main/java/net/shibboleth/shared/spring/service/AbstractServiceableComponent.java
@@ -20,6 +20,7 @@ import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import org.slf4j.Logger;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
 import org.springframework.context.ConfigurableApplicationContext;
@@ -120,6 +121,14 @@ public abstract class AbstractServiceableComponent<T> extends AbstractIdentifiab
 
         if (null != oldContext) {
             log.debug("Component '{}': Closing the appcontext", getId());
+            ConfigurableListableBeanFactory clbf = oldContext.getBeanFactory();
+            for (final String beanName :oldContext.getBeanDefinitionNames()) {
+                final Object bean = clbf.getSingleton(beanName);
+                if (AnnotationsSupport.hasPreDestroyAnnotation(bean)) {
+                    log.debug("Bean could be town down : {}", beanName);
+                }                
+            }
+            
             oldContext.close();
         }
         // If we were not created by spring we need to do the destroy of ourself.
diff --git a/shib-support/src/main/java/net/shibboleth/shared/component/AbstractInitializableComponent.java b/shib-support/src/main/java/net/shibboleth/shared/component/AbstractInitializableComponent.java
index d6a8c7f2..4c458ffe 100644
--- a/shib-support/src/main/java/net/shibboleth/shared/component/AbstractInitializableComponent.java
+++ b/shib-support/src/main/java/net/shibboleth/shared/component/AbstractInitializableComponent.java
@@ -30,7 +30,7 @@ public abstract class AbstractInitializableComponent implements DestructableComp
 
     /** {@inheritDoc} */
     @Override
-    public final synchronized boolean isDestroyed() {
+    public final synchronized boolean XisDestroyed() {
         return isDestroyed;
     }
 
@@ -42,12 +42,12 @@ public abstract class AbstractInitializableComponent implements DestructableComp
 
     /** {@inheritDoc} */
     @Override
-    public final synchronized void destroy() {
-        if (isDestroyed()) {
+    public final synchronized void Xdestroy() {
+        if (XisDestroyed()) {
             return;
         }
 
-        doDestroy();
+        XdoDestroy();
         isDestroyed = true;
     }
 
@@ -101,7 +101,7 @@ public abstract class AbstractInitializableComponent implements DestructableComp
      * Performs component specific destruction logic. This method is executed within the lock on the object being
      * destroyed. The default implementation of this method is a no-op.
      */
-    protected void doDestroy() {
+    protected void XdoDestroy() {
 
     }
 
diff --git a/shib-support/src/main/java/net/shibboleth/shared/component/DestructableComponent.java b/shib-support/src/main/java/net/shibboleth/shared/component/DestructableComponent.java
index a00bdd8a..9eca0fcc 100644
--- a/shib-support/src/main/java/net/shibboleth/shared/component/DestructableComponent.java
+++ b/shib-support/src/main/java/net/shibboleth/shared/component/DestructableComponent.java
@@ -22,8 +22,8 @@ public interface DestructableComponent extends Component {
      * 
      * @return true iff the component has been destroyed
      */
-    public boolean isDestroyed();
+    public boolean XisDestroyed();
 
     /** Destroys the component. */
-    public void destroy();
+    public void Xdestroy();
 }
\ No newline at end of file

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


More information about the commits mailing list