protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (isRemoveService(context)) { JMXSubsystemAdd.launchServices(context, model, auditLoggerInfo, authorizer, securityIdentitySupplier, hostInfoAccessor); } else { context.revertReloadRequired(); } }
private JMXSubsystemRootResource(ManagedAuditLogger auditLogger, JmxAuthorizer authorizer, Supplier<SecurityIdentity> securityIdentitySupplier, RuntimeHostControllerInfoAccessor hostInfoAccessor) { super(new Parameters(PATH_ELEMENT, JMXExtension.getResourceDescriptionResolver(JMXExtension.SUBSYSTEM_NAME)) .setAddHandler(new JMXSubsystemAdd(auditLogger, authorizer, securityIdentitySupplier, hostInfoAccessor)) .setRemoveHandler(new JMXSubsystemRemove(auditLogger, authorizer, securityIdentitySupplier, hostInfoAccessor)) .addCapabilities(JMX_CAPABILITY) .setAccessConstraints(JMXExtension.JMX_SENSITIVITY_DEF)); this.auditLogger = auditLogger; this.authorizer = authorizer; this.securityIdentitySupplier = securityIdentitySupplier; this.hostInfoAccessor = hostInfoAccessor; }
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) { if (isRemoveService(context)) { //Since so many things can depend on this, only remove if the user set the ALLOW_RESOURCE_SERVICE_RESTART operation header context.removeService(MBeanServerService.SERVICE_NAME); } else { context.reloadRequired(); } }