@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<Void> voidHandback) throws OperationFailedException { // Some might ask why we are comparing a resolvedValue with the currentValuewhich is not resolved. // Well the issue is that the context that would permit to resolve the currentValue might have changed thus // the resolved value for the currentValue wouldn't be correct. // In fact we just can't resolve the currentValue without any doubt. When in doubt reload, so we will return true in this case. // For example if the currentValue is ${foo} and that for some reason foo has changed in between, then we should reload even if now ${foo} resolves // as resolvedValue. ModelNode resolvedTypedValue = convertToType(attributeName, resolvedValue); return !resolvedTypedValue.equals(currentValue); }
@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<Void> voidHandback) throws OperationFailedException { // Some might ask why we are comparing a resolvedValue with the currentValuewhich is not resolved. // Well the issue is that the context that would permit to resolve the currentValue might have changed thus // the resolved value for the currentValue wouldn't be correct. // In fact we just can't resolve the currentValue without any doubt. When in doubt reload, so we will return true in this case. // For example if the currentValue is ${foo} and that for some reason foo has changed in between, then we should reload even if now ${foo} resolves // as resolvedValue. ModelNode resolvedTypedValue = convertToType(attributeName, resolvedValue); return !resolvedTypedValue.equals(currentValue); }
@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<Void> voidHandback) throws OperationFailedException { // Some might ask why we are comparing a resolvedValue with the currentValuewhich is not resolved. // Well the issue is that the context that would permit to resolve the currentValue might have changed thus // the resolved value for the currentValue wouldn't be correct. // In fact we just can't resolve the currentValue without any doubt. When in doubt reload, so we will return true in this case. // For example if the currentValue is ${foo} and that for some reason foo has changed in between, then we should reload even if now ${foo} resolves // as resolvedValue. ModelNode resolvedTypedValue = convertToType(attributeName, resolvedValue); return !resolvedTypedValue.equals(currentValue); }