Skip to content
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

XmlConfiguration set from property #3789

Closed
gregw opened this issue Jun 17, 2019 · 4 comments
Closed

XmlConfiguration set from property #3789

gregw opened this issue Jun 17, 2019 · 4 comments

Comments

@gregw
Copy link
Contributor

gregw commented Jun 17, 2019

The jetty xml files have many Set clauses like:

        <Set name="forwardedHostHeader"><Property name="jetty.httpConfig.forwardedHostHeader" default="X-Forwarded-Host"/></Set>

This means that during startup the setter is always called and there is a default value in the XML. It may improve startup time and reduce the duplication of default values if we implemented the following:

        <Set name="forwardedHostHeader" property="jetty.httpConfig.forwardedHostHeader"/>

where the setter is only called if the property is actually set.

@gregw gregw added this to the 10.0.x milestone Jun 17, 2019
@gregw
Copy link
Contributor Author

gregw commented Jun 17, 2019

@sbordet @joakime @janbartel thoughts?

@joakime
Copy link
Contributor

joakime commented Jun 17, 2019

+1 from me, I'm good with that syntax.

gregw added a commit that referenced this issue Jun 17, 2019
Signed-off-by: Greg Wilkins <gregw@webtide.com>
@janbartel
Copy link
Contributor

I think it's a good idea. Just have to be sure some XML files aren't relying on the default value being set.

@gregw
Copy link
Contributor Author

gregw commented Jun 18, 2019

@janbartel I've been reviewing the XMLs as I modify them and keeping defaults if they differ from what the class does by itself. I'd say I'm only 98% on this and need to review some more.... but the exercise does show how annoying it is to have defaults in more than one place!

gregw added a commit that referenced this issue Jun 21, 2019
Issue #3789 XmlConfiguration Set Property

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw closed this as completed Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants