hey folks,
i have written a little gem to parse JVM options and would love some
feedback on it. Managing JVM options in a cookbooks is a total PITA
and I hope this makes it easier. This is less than alpha quality, i am
posting it here to get some feedback, not to notify others of a
production-ready tool. I foresee it being used in Java-related
cookbooks to provide a set of application-specific defaults and then
make it easy to override or add to them in recipe code.
https://github.com/bryanwb/jvmargs
This library parses JVM options so that any given option is only
stored once. It does this by breaking each option into one of the
three option categories:
1. standard, ex: -server, -enablesystemassertions
2. nonstandard, ex: -Xmx128M, -Xint
3. unstable, ex: -XX:-DisableExplicitGC, -XX:AltStack=128M
4. directive, ex: -Dcom.sun.management.jmxremote
JVMArgs will ensure that only one value is stored for any given
option. Here is a quick example
args = JVMArgs::Args.new("-XX:-DisableExplicitGC", "-Xmx256M")
# "-XX:-DisableExplicitGC" is now stored in args
args.add("-XX:+DisableExplicitGC")
args.add("-Xmx2G")
# the settings are now "-XX:+DisableExplicitGC" and "-Xmx2G"
Archive powered by MHonArc 2.6.16.