Skip to content

Commit

Permalink
Merge pull request wildfly#18293 from michpetrov/wfly-19843
Browse files Browse the repository at this point in the history
WFLY-19843: deregister capability on removal
  • Loading branch information
bstansberry authored Oct 13, 2024
2 parents 38b786d + afea8ba commit ee5ce21
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ protected void performRemove(OperationContext context, ModelNode operation, Mode
this.knownApplicationSecurityDomains.removeIf(domain -> domain.isSameDomain(name));
}

@Override
protected void recordCapabilitiesAndRequirements(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException {
super.recordCapabilitiesAndRequirements(context, operation, resource);
context.deregisterCapability(
RuntimeCapability.buildDynamicCapabilityName(CAPABILITY_APPLICATION_SECURITY_DOMAIN_KNOWN_DEPLOYMENTS, context.getCurrentAddressValue())
);
}

@Override
protected ServiceName serviceName(String name) {
return APPLICATION_SECURITY_DOMAIN_CAPABILITY.getCapabilityServiceName(ApplicationSecurityDomain.class, name);
Expand Down

0 comments on commit ee5ce21

Please sign in to comment.