New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WFCORE-38] Add console option to target of console-handler #88
Conversation
case VERSION_2_0_0: { | ||
resourceBuilder | ||
.getAttributeBuilder() | ||
.setValueConverter(new DefaultAttributeConverter() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a reject rather than a conversion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like:
.addRejectCheck(SIMPLE_EXPRESSIONS, TARGET)
.addRejectCheck(new SimpleRejectAttributeChecker(new ModelNode("console"), TARGET)
.end();
As per the BaseAttributeTransformationDescriptionBuilder.addRejectCheck() javadoc, the reject checkers should be evaluated in the order they are added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to reject expressions? They are valid for the attribute. I assume it's in case the expression resolves to console. My thinking though, probably wrong :), is that it would be a configuration error setting the value to console on the target that does not support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a standard 'pattern'. Transformation happens on the DC, and for cases where the DC needs to check for a particular value during transformation, we don't know the expression will resolve to on the legacy server, so we reject expressions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, got it. Maybe adding this attribute value isn't worth it then if it means rejecting expressions. It probably doesn't add all that much as I assume stderr and stdout will be used more often. I guess too though an expression may not be used for this value often so maybe it doesn't matter...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is probably worth keeping it, I assume the majority of users will be running homogenous domains. And if not, then there are plenty of other cases like this they will need to set up.
…ich translates to System.console().
[WFCORE-38] Add console option to target of console-handler
WFCORE-1243 Undertow 1.3.11.Final
Adds an option to use the
System.console()
for the console-handler. Kept default ofSystem.out
.