The GlassFish Server asadmin configure-jruby-container subcommand provides several options for configuring a JRuby container. Changes made to a JRuby container using the configure-jruby-container subcommand are written to the GlassFish Server domain's domain.xml file, which makes the changes persistent.
The general syntax for configuring the JRuby container is:
asadmin configure-jruby-container --property=value |
For example, the following command sets the jruby-home property:
asadmin configure-jruby-container --jruby-home=jruby-install |
Table 1–1 lists the options provided by the asdmin configure-jruby-container subcommand.
Table 1–1 asdmin configure-jruby-container Options
Option |
Description |
---|---|
--help | -? |
Displays the help text for the subcommand. |
--monitoring |
If set to true, enables monitoring for the JRuby container. The default is false. |
--jruby-home |
The directory in which JRuby itself (not the GlassFish Server JRuby container) is installed. The specified directory must exist or an error will occur. Note, however, that the configure-jruby-container subcommand does not check whether JRuby is installed in the directory. The default directory is as-install/jruby, which is the directory in which Update Tool installs JRuby. Therefore, if you obtained JRuby from Update Tool, this option is not required. |
--jruby-runtime |
The initial number of JRuby runtime instances in the pool. This number must be greater than 0, greater than or equal to --jruby-runtime-min, and less than or equal to --jruby-runtime-max. The default is 1. |
--jruby-runtime-min |
The minimum number of JRuby runtime instances in the pool. This number must be greater than 0, and less than or equal to --jruby-runtime and --jruby-runtime-max. The pool will always be at least this large, but can also be larger. The default is 1. |
--jruby-runtime-max |
The maximum number of JRuby runtime instances in the pool. This number must be greater than 0, and greater than or equal to --jruby-runtime and --ruby-runtime-min. The default is 1. Setting this value too high can cause OutOfMemory errors, either in the heap or PermGen. |
--show |
If set to true, displays the current settings of the Enterprise Server JRuby container. The default is true. |
For additional information about the asadmin JRuby configuration options, see the configure-jruby-container(1) man page.