gemmellr commented on code in PR #5942:
URL: https://github.com/apache/activemq-artemis/pull/5942#discussion_r2394023768
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java:
##########
@@ -4624,9 +4625,14 @@ public void reloadConfigurationFile() throws Exception {
}
private void reloadConfigurationFile(URL uri) throws Exception {
- Configuration config = new
FileConfigurationParser().parseMainConfig(uri.openStream());
- LegacyJMSConfiguration legacyJMSConfiguration = new
LegacyJMSConfiguration(config);
- legacyJMSConfiguration.parseConfiguration(uri.openStream());
+ Configuration config = null;
Review Comment:
I agree with what Tim said, this seems like it just overwrites various
settings in an originally-present Configuration[Impl] in the
_\[this.\]configuration_ field, using the values from a freshly created
_config_ ConfigurationImpl which may be different.
There is no comparison done, it just gets the values from the new _config_
and sets them on the existing _configuration_. Anything that is 'actually
reloadable' amongst these updated bits can then be reloaded, potentially with
the default / wrong value, in the deployReloadableConfigFromConfiguration
method that uses these now-overwritten settings.
It feels to me like it should do more like it did originally, if there is no
xml config uri (the 'uri' parameter should probably be renamed to make clear
thats what it is) then its the case that the properties are the only thing
reloadable and it should just no-op the XML-config related section and use the
original _configuration_ object. Essentially the same as it did before now,
because it didnt try to reload _anything_ when there was no XML config.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact