[jboss-dev-forums] [JBoss AS7 Development] - JBoss AS7 System Properties

Rostislav Svoboda do-not-reply at jboss.com
Fri Oct 21 02:25:53 EDT 2011


Rostislav Svoboda [http://community.jboss.org/people/rsvoboda] modified the document:

"JBoss AS7 System Properties"

To view the document, visit: http://community.jboss.org/docs/DOC-17157

--------------------------------------------------------------
This article will talk about setting the system properties in JBoss AS7+

To understand the potential files where the system properties can be configured,  please refer to AS7 Admin Guide.
 https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-SystemProperties https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-SystemProperties


In the Standalone mode,  the change will go into standalone.xml
In the Domain mode, the change will go into domain.xml

Add it to the +*system-properties*+  element right after the +*extensions*+ element.

<server name="xyz.home" xmlns="urn:jboss:domain:1.0">
    <extensions>
        <extension module="org.jboss.as.clustering.infinispan"/>
        <extension module="org.jboss.as.clustering.jgroups"/>
        <extension module="org.jboss.as.connector"/> 
        ....
        <extension module="org.torquebox.web"/>
    </extensions>
    <system-properties>
        <property name="org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR" value="false"/>
    </system-properties>


h3. Adding and reading system property using CLI
For standalone mode:

$ ./bin/jboss-admin.sh --connect controller=IP_ADDRESS
[standalone at IP_ADDRESS:9999 /] /system-property=foo:add(value=bar)
[standalone at IP_ADDRESS:9999 /] /system-property=foo:read-resource
{
    "outcome" => "success",
    "result" => {"value" => "bar"}
}


For domain mode the same commands are used, you can specify system properties for: 
* all hosts and instances in domain 
[domain at IP_ADDRESS:9999 /] /system-property=foo:add(value=bar)

* host and its instances
[domain at IP_ADDRESS:9999 /] /host=master/system-property=foo:add(value=bar)

* just one instance
[domain at IP_ADDRESS:9999 /] /host=master/server-config=server-one/system-property=foo:add(value=bar)


h2. Reference
 http://community.jboss.org/docs/DOC-17182 http://community.jboss.org/wiki/JBossAS7HowDoI
--------------------------------------------------------------

Comment by going to Community
[http://community.jboss.org/docs/DOC-17157]

Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111021/efcc58b5/attachment.html 


More information about the jboss-dev-forums mailing list