mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
29.24.2009 58720865b23569b77418500bf07de0fd0c558cb1
refs
author jvergara <jvergara@localhost>
Wednesday, July 29, 2009 16:24 +0200
committer jvergara <jvergara@localhost>
Wednesday, July 29, 2009 16:24 +0200
commit58720865b23569b77418500bf07de0fd0c558cb1
tree 8b4c313164644dacdeeaa4a61ccc126ec3db661f tree | zip | gz
parent d9ca46a0998a606ca2c5973b3babb6921564e4a4 view | diff
Fix for issue 4151 (Default java heap not enough to launch import)

The idea is to improve what we currently have, which is relying on java ergonomics and only setting the '-client' and '-server' arguments as default java arguments. As far as I can see with the new import code, the java ergonomics (this has been reproduced in Solaris and Mac OS X) are not enough to guarantee that the server will be able to make a small import (around 2000 entries) out of the box.

The proposed fix tries to set the following arguments to the server command-lines (start-ds and import-ldif in particular):

-Xms128m -Xmx256m

These arguments will be set if and only if:

They can be used while the setup is being run (and so the JVM supports them and the system where we are running is able to launch a JVM using them).

The ergonomics of the JVM where the setup is being run does not allocate a maximum heap that is higher than those values. With this check we guarantee that we are not going to allocate less memory than what the JVM already does by default.
1 files modified
50 ■■■■■ changed files
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java 50 ●●●●● diff | view | raw | blame | history