2 Replies Latest reply on Jun 11, 2012 5:48 PM by enguerrandd

    System properties expansion in jvm-options

    Newbie

      I'm using JBoss AS 7.1.0.Final in domain mode and trying to use system properties in the JVM configuration. My config looks like this:

       

          <server-groups>

              <server-group name="dcs" profile="ha">

                      <system-properties>

                              <property name="java.awt.headless" value="true"/>

                              <property name="hibernate.generate_statistics" value="true"/>

                              <property name="org.jboss.resolver.warning" value="true"/>

                              <property name="jboss.modules.system.pkgs" value="org.jboss.byteman"/>

                              <property name="sun.lang.ClassLoader.allowArraySyntax" value="true"/>

                      </system-properties>

                  <jvm name="default">

                      <heap size="1536m" max-size="1536m"/>

                      <permgen size="256m" max-size="256m"/>

                      <stack size="256k"/>

                      <jvm-options>

                          <option value="-server"/>

                          <option value="-XX:+UseParallelGC"/>

                          <option value="-XX:ParallelGCThreads=16"/>

                          <option value="-XX:+DisableExplicitGC"/>

                          <option value="-XX:+JavaMonitorsInStackTrace"/>

                          <option value="-XX:+HeapDumpOnOutOfMemoryError"/>

                          <option value="-XX:HeapDumpPath=${jboss.server.log.dir}"/>

                      </jvm-options>

                  </jvm>

                  <socket-binding-group ref="ha-sockets"/>

              </server-group>

          </server-groups>

       

       

      When I dump the jvm-options in the CLI I see that the property ${jboss.server.log.dir} hasn't been expanded:

       

      [domain@localhost:9999 /] /server-group=dcs/jvm=default:read-resource                                              

      {

          "outcome" => "success",

          "result" => {

              "agent-lib" => undefined,

              "agent-path" => undefined,

              "env-classpath-ignored" => undefined,

              "environment-variables" => undefined,

              "heap-size" => "1536m",

              "java-agent" => undefined,

              "java-home" => undefined,

              "jvm-options" => [

                  "-server",

                  "-XX:+UseParallelGC",

                  "-XX:ParallelGCThreads=16",

                  "-XX:+DisableExplicitGC",

                  "-XX:+JavaMonitorsInStackTrace",

                  "-XX:+HeapDumpOnOutOfMemoryError",

                  "-XX:HeapDumpPath=${jboss.server.log.dir}"

              ],

              "max-heap-size" => "1536m",

              "max-permgen-size" => "256m",

              "permgen-size" => "256m",

              "stack-size" => "256k",

              "type" => undefined

          }

      }

       

      Is it a bug or the intended behavior?  If it is the intended behavior, what is the AS7 way for setting this kind of thing?

       

      thanks in advance.