5 Replies Latest reply on Jun 17, 2012 7:09 AM by Wolf-Dieter Fink

    properties subsystem documentation?

    Ben Schofield Novice

      Is there any documentation on the new properties subsystem in AS 7? 

       

      I set a boot time property thinking I would see it on the command line of the running process.

       

      <system-properties>

      <property name="-Dtest.boot" value="test"/>

      </system-properties>

       

      What I see on the commandline is "-D[Standalone]".  Was expecting "-Dtest.boot=test".  This makes me second guess how the properties subsystem is to be properly used.  Unfortunately, I have had no luck finding documentation on the subject.

        • 1. Re: properties subsystem documentation?
          Wolf-Dieter Fink Master

          where do you add this part of XML?

          And what mode you run, domain or standalone.

          attach a bit more of the configuration

          • 2. Re: properties subsystem documentation?
            Ben Schofield Novice

            I'm running the standalone-full-ha.xml config and starting JBoss with the init.d script jboss-as-standalone.sh.  I should mention I am using JBoss EAP 6.0.0 GA.  Looking for any documentation so I can do my homework before involving support.

             

            The system-properties are set with the admin console.  It gets written after the extensions and before the management tags.

             

              

            ...

            <extension module="org.jboss.as.threads"/>

                <extension module="org.jboss.as.transactions"/>
                <extension module="org.jboss.as.web"/>
                <extension module="org.jboss.as.webservices"/>
                <extension module="org.jboss.as.weld"/>
            </extensions>

             

            <system-properties>
                <property name="-Dtest.boot" value="test"/>
            </system-properties>

             

             

            <management>
                <security-realms>
                    <security-realm name="ManagementRealm">
                        <authentication>
                           

            <local default-user="$local"/>

            ...

            • 3. Re: properties subsystem documentation?
              Wolf-Dieter Fink Master

              Hi Ben,

               

              unfortunately there is not a lot of documentation right now.

              You can have a look into the docs/schema folder, often you find here more informations about the configuration.

              Also you can use the CLI :read-resource-description command.

               

              In your case the system-property is written after start of the standalone server. There is no possiblity to set it for boot time (this way)

              If you need it during boot time the standalone.conf will be the right place.

               

              For domain configuration the properties can be set for boot time (as you have no control to each server) this can be done by the property element with the attribute boot-time="true"


              • 4. Re: properties subsystem documentation?
                Wolf-Dieter Fink Master

                Just another hint

                you should not use "-D" in you property name here

                I think it was not your intention

                • 5. Re: properties subsystem documentation?
                  Wolf-Dieter Fink Master

                  If you use the domain mode:

                  {code host.xml}

                  <servers>

                          <server name="server-one" group="main-server-group">

                            <system-properties>

                              <property name="test.property" value="hereIam"/>

                            </system-properties>

                  {code}

                   

                  you get the result that you expect:

                  jboss-modules.jar -D[Server:server-one] -XX:PermSize=256m ... -Dtest.property=hereIam ...

                   

                  The property element in this case can be set on domain/server-group/server level and contain the boot-time attribute which is true by default. If you set it to false it will not be added at boot time and therefore not seen in the argument list.