@Override
public void internalUndeploy(final org.jboss.as.server.deployment.DeploymentUnit context) {
if (isWebServiceDeployment(context)) {
ServerConfigImpl config = (ServerConfigImpl)context.getServiceRegistry().getRequiredService(WSServices.CONFIG_SERVICE).getValue();
config.decrementWSDeploymentCount();
}
}
private static boolean isWebServiceDeployment(final DeploymentUnit unit) {
return unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY) != null;