[java-shib-metadata] branch main updated: IDP-2487 Warning during shutdown related to new destruction path
Codeberg
noreply at shibboleth.net
Thu Nov 5 17:21:23 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-metadata.
View the commit online:
https://codeberg.org/Shibboleth/java-shib-metadata/commit/08beb6ed7ae7262b9c540d609fc7b687956ce912
The following commit(s) were added to refs/heads/main by this push:
new 08beb6ed IDP-2487 Warning during shutdown related to new destruction path
08beb6ed is described below
commit 08beb6ed7ae7262b9c540d609fc7b687956ce912
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Nov 5 15:59:52 2026 +0000
IDP-2487 Warning during shutdown related to new destruction path
https://shibboleth.atlassian.net/browse/IDP-2487
Make MetadataProviderContainer Disposable to prevent being called at
close() when the service reloads.
---
.../idp/saml/metadata/impl/MetadataProviderContainer.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/metadata/impl/MetadataProviderContainer.java b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/metadata/impl/MetadataProviderContainer.java
index 3661224c..79213b42 100644
--- a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/metadata/impl/MetadataProviderContainer.java
+++ b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/metadata/impl/MetadataProviderContainer.java
@@ -20,6 +20,8 @@ import javax.annotation.Nonnull;
import org.opensaml.saml.metadata.resolver.MetadataResolver;
import org.slf4j.Logger;
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.context.ApplicationContext;
import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
import net.shibboleth.shared.component.ComponentInitializationException;
@@ -30,9 +32,14 @@ import net.shibboleth.shared.spring.service.AbstractServiceableComponent;
/**
* This class is a sortable container for {@link MetadataResolver}s, wrapped into a serviceable component.
+ *
+ * It explicitly implements {@link DisposableBean} because is contained in the Metadata Provider service's
+ * {@link ApplicationContext} and so it has a Spring lifecycle. With a Disposable garnish Spring will call the
+ * class's {@link AutoCloseable#close()} method and for {@link AbstractServiceableComponent} that is not
+ * idempotent, so during app context teardown we get a wanting IDP-2487.
*/
public class MetadataProviderContainer extends AbstractServiceableComponent<MetadataResolver>
- implements Comparable<MetadataProviderContainer> {
+ implements Comparable<MetadataProviderContainer>, DisposableBean {
/** If we autogenerate a sort key it comes from this count. */
private static int sortKeyValue;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list