- From: Bryan Berry <
>
- To:
- Subject: [chef] [ANN] jvmargs 0.0.2
- Date: Mon, 25 Mar 2013 11:41:27 +0100
hey guys,
just released jvmargs gem 0.0.2 which now allow you to add arbitrary
rules for JVM arguments
Here is an example that allows you to force the maximum and minimum
heap sizes to be equal
args = JVMArgs::Args.new("Xmx256M")
args.add_rule(:equal_max_min_heap) do |args|
value = args[:nonstandard]['Xmx'].value
args[:nonstandard]['Xms'].value = JVMArgs::NonStandard.new("Xms#{value}")
end
here is a rule to raise an error if -XX:MaxPermSize is less than 256M
args = JVMArgs::Args.new("Xmx256M")
# process more args here, possibly from node attributes
args.add_rule(:min_permgen) do |args|
value = args[:unstable]['MaxPermSize'].value
value_num = JVMArgs::Utils.get_raw_num(value)
if value_num < 256
raise ArgumentError, "This application requires at least 256M of
permgen, you supplied #{value}"
end
end
- [chef] [ANN] jvmargs 0.0.2, Bryan Berry, 03/25/2013
Archive powered by MHonArc 2.6.16.