Skip to content

Commit

Permalink
ARTEMIS-1096 Fixing configuration issues on calculated global-max-page
Browse files Browse the repository at this point in the history
  • Loading branch information
clebertsuconic committed Apr 11, 2017
1 parent f282dff commit 4e59c17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
@@ -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>
Expand Up @@ -316,7 +316,13 @@ public void parseMainConfig(final Element e, final Configuration config) throws

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));

Expand Down

0 comments on commit 4e59c17

Please sign in to comment.