Configure JRuby Runtime Pool on GlassFish v3 Prelude
- Setting -Djruby.runtime=X will set the initial number of jruby runtimes that Glassfish starts with. It defaults to one. It also represents the lowest value that Glassfish will use for the maximum and the highest value that Glassfish will accept for the minimum. As of this time, setting this number too high may cause undesirable behavior.
- Setting -Djruby.runtime.max=X will set the maximum number of jruby runtimes that may be available in the pool. It defaults to two. The pool will not neccessarily be this large. Values that are too high may result in OutOfMemory errors, either in the heap or in the PermGen.
- Setting -Djruby.runtime.min=X will set the minimum number of jruby runtimes that will be available in the pool. It defaults to one. The pool will always be at least this large, but may well be larger than this.
To set these properties in domain.xml, add the <jvm-options> elements below with the values that you would like the runtime to be configured with as indicated under <java-config> element.
<java-config>
<jvm-options>-Djruby.runtime.min=1</jvm-options>
<jvm-options>-Djruby.runtime=2</jvm-options>
<jvm-options>-Djruby.runtime.max=3</jvm-options>
</java-config>
|