users@glassfish.java.net

Re: JVM options only on Cluster or instance settings?

From: <glassfish_at_javadesktop.org>
Date: Thu, 05 Jun 2008 11:53:42 PDT

Good question.

No, such a facility is not available directly, however. A domain's configuration is generally independent of actual running server's/cluster's configuration. What you can best do is to identify those things in your JVM configuration that can be tokenized and define the values of those tokens at a domain level. The idea is manifested by using what we call "system-properties" (an unfortunate name as it conflicts with Java system properties) and is denoted as a <system-property> element in domain.xml. For example, you could define something like this:

<system-property name="MaxHeapSize" value="1024m"/>

and refer to it from a cluster's configuration (e.g. in <cluster1-config> as:

<java-config ...>
  <jvm-options> ${MaxHeapSize} </jvm-options>
...
</java-config>

Thus, when you change the value of the system-property to say 2048m, all the clusters would
start asking for 2G as the maximum heap size.

Hope this helps.

Regards,
Kedar

PS - look at: [b]asadmin create-system-properties[/b] command.
[Message sent by forum member 'km' (km)]

http://forums.java.net/jive/thread.jspa?messageID=278598