diff --git a/elytron/src/main/java/org/wildfly/extension/elytron/SSLContextResource.java b/elytron/src/main/java/org/wildfly/extension/elytron/SSLContextResource.java index 3fe5ebabcd3..b83d88e23c7 100644 --- a/elytron/src/main/java/org/wildfly/extension/elytron/SSLContextResource.java +++ b/elytron/src/main/java/org/wildfly/extension/elytron/SSLContextResource.java @@ -21,7 +21,7 @@ import org.jboss.msc.service.ServiceController; import org.jboss.msc.service.ServiceController.State; import org.wildfly.common.iteration.ByteIterator; -import org.wildfly.security.dynamic.ssl.DynamicSSLContext; +import org.wildfly.security.auth.client.ActiveSessionsSSLContext; /** * A {@link Resource} to represent a server-ssl-context/client-ssl-context, the majority is actually model @@ -130,8 +130,8 @@ public Resource clone() { */ private boolean hasActiveSessions() { final SSLContext sslContext = getSSLContext(sslContextServiceController); - if (sslContext instanceof DynamicSSLContext) { - return false; + if (sslContext instanceof ActiveSessionsSSLContext) { + return ((ActiveSessionsSSLContext) sslContext).hasActiveSessions(); } if (sslContext == null) return false; SSLSessionContext sslSessionContext = server ? sslContext.getServerSessionContext() : sslContext.getClientSessionContext(); diff --git a/elytron/src/test/resources/org/wildfly/extension/elytron/elytron-subsystem-community-18.0.xml b/elytron/src/test/resources/org/wildfly/extension/elytron/elytron-subsystem-community-18.0.xml index c7c78cc9245..79811affd81 100644 --- a/elytron/src/test/resources/org/wildfly/extension/elytron/elytron-subsystem-community-18.0.xml +++ b/elytron/src/test/resources/org/wildfly/extension/elytron/elytron-subsystem-community-18.0.xml @@ -5,6 +5,9 @@ + + + @@ -349,6 +352,9 @@ + + +