@Override
 protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model)
     throws OperationFailedException {
   if (context.isResourceServiceRestartAllowed()) {
     removeRuntimeService(context, operation);
   } else {
     context.reloadRequired();
   }
 }
 private boolean isRemoveService(OperationContext context) {
   if (context.isNormalServer()) {
     if (context.isResourceServiceRestartAllowed()) {
       context.removeService(MBeanServerService.SERVICE_NAME);
       return true;
     }
   }
   return false;
 }
 @Override
 protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model)
     throws OperationFailedException {
   if (context.isResourceServiceRestartAllowed()) {
     final String name =
         PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS))
             .getLastElement()
             .getValue();
     NamingBindingAdd.INSTANCE.installRuntimeServices(context, name, model, null, null);
   } else {
     context.revertReloadRequired();
   }
 }