[MGNLBACKUP-19] -Xmx is overriden by scripts Created: 25/Feb/09  Updated: 29/Mar/22  Resolved: 04/Nov/15

Status: Closed
Project: Backup
Component/s: None
Affects Version/s: 1.0.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Magnolia International Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MGNLTOOLS-33 --Xmx is overriden by scripts Closed
dependency
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Team: Nucleus

 Description   

the generated scripts contain this

CLASSPATH=$CLASSPATH_PREFIX:"$BASEDIR"/etc:"$REPO"/commons-cli-1.1.jar:"$REPO"/magnolia-module-backup-1.1-SNAPSHOT.jar:"$REPO"/magnolia-tools-1.1-rc2.jar
EXTRA_JVM_ARGUMENTS="-Xmx256M"

[...]

exec "$JAVACMD" $JAVA_OPTS \
 $EXTRA_JVM_ARGUMENTS [...]

EXTRA_JVM_ARGUMENTS is thus overiding any JAVA_OPTS, which in this case is not desirable.



 Comments   
Comment by Jan Haderka [ 26/Feb/09 ]

The generated script is correct. Also script comes with -Xmx already preset and it is only sensible thing to change its value there rather then setting it elsewhere. Moreover script is completely generated by the assembly plugin and not modified by us.
The variable naming suggests the distinction for setting various options - JAVA_OPTS for regular options and EXTRA_JVM_ARGUMENTS for non standard extra arguments (-X, -XX).

Comment by Magnolia International [ 26/Feb/09 ]

The problem is
1) EXTRA_JVM_ARGUMENTS is an internal variable to this script that can't be set outside of it. (well, it can, but is ignored)
2) JAVA_OPTS is overridden by EXTRA_JVM_ARGUMENTS

All in all, it is impossible to set -Xmx without modifying this script; that would be vaguely acceptable if said variable was very visible at the top of the script, and not buried deep at the bottom of it.

Comment by Robert Šiška [ 24/Nov/14 ]

See https://jira.codehaus.org/browse/MAPPASM-229

Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Generated at Sun Feb 11 23:24:47 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.