@Override public void registerAttributes(ManagementResourceRegistration hostRegistration) { super.registerAttributes(hostRegistration); hostRegistration.registerReadWriteAttribute( DIRECTORY_GROUPING, null, new ReloadRequiredWriteAttributeHandler(DIRECTORY_GROUPING) { @Override protected boolean requiresRuntime(OperationContext context) { return context.getRunningMode() == RunningMode.NORMAL && !context.isBooting(); } }); hostRegistration.registerReadOnlyAttribute(PRODUCT_NAME, null); hostRegistration.registerReadOnlyAttribute(SERVER_STATE, null); hostRegistration.registerReadOnlyAttribute(RELEASE_VERSION, null); hostRegistration.registerReadOnlyAttribute(RELEASE_CODENAME, null); hostRegistration.registerReadOnlyAttribute(PRODUCT_VERSION, null); hostRegistration.registerReadOnlyAttribute(MANAGEMENT_MAJOR_VERSION, null); hostRegistration.registerReadOnlyAttribute(MANAGEMENT_MINOR_VERSION, null); hostRegistration.registerReadOnlyAttribute(MANAGEMENT_MICRO_VERSION, null); hostRegistration.registerReadOnlyAttribute(MASTER, IsMasterHandler.INSTANCE); hostRegistration.registerReadOnlyAttribute(DOMAIN_CONTROLLER, null); hostRegistration.registerReadOnlyAttribute(ServerRootResourceDefinition.NAMESPACES, null); hostRegistration.registerReadOnlyAttribute(ServerRootResourceDefinition.SCHEMA_LOCATIONS, null); hostRegistration.registerReadWriteAttribute( HostResourceDefinition.NAME, environment.getProcessNameReadHandler(), environment.getProcessNameWriteHandler()); hostRegistration.registerReadOnlyAttribute( HostResourceDefinition.HOST_STATE, new ProcessStateAttributeHandler(processState)); hostRegistration.registerReadOnlyAttribute( ServerRootResourceDefinition.RUNNING_MODE, new RunningModeReadHandler(runningModeControl)); hostRegistration.registerReadOnlyAttribute( ServerRootResourceDefinition.SUSPEND_STATE, SuspendStateReadHandler.INSTANCE); }