ARTEMIS-1096 Fixing configuration issues on calculated global-max-page

This commit is contained in:
Clebert Suconic 2017-04-11 10:08:17 -04:00
parent f282dff57c
commit 4e59c174ff
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,3 @@
<!-- the system will enter into page mode once you hit this limit.
This is an estimate in bytes of how much the messages are using in memory -->
<!--
<global-max-size>${global-max-size}</global-max-size>

View File

@ -316,7 +316,13 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
config.setConfigurationFileRefreshPeriod(getLong(e, "configuration-file-refresh-period", config.getConfigurationFileRefreshPeriod(), Validators.GT_ZERO));
config.setGlobalMaxSize(getTextBytesAsLongBytes(e, GLOBAL_MAX_SIZE, config.getGlobalMaxSize(), Validators.MINUS_ONE_OR_GT_ZERO));
long globalMaxSize = getTextBytesAsLongBytes(e, GLOBAL_MAX_SIZE, -1, Validators.MINUS_ONE_OR_GT_ZERO);
if (globalMaxSize > 0) {
// We only set it if it's not set on the XML, otherwise getGlobalMaxSize will calculate it.
// We do it this way because it will be valid also on the case of embedded
config.setGlobalMaxSize(globalMaxSize);
}
config.setMaxDiskUsage(getInteger(e, MAX_DISK_USAGE, config.getMaxDiskUsage(), Validators.PERCENTAGE));