Skip to end of metadata
Go to start of metadata

Configuration of the JVM settings is different for a managed domain and a standalone server. In a managed domain, the domain controller components are responsible for starting and stoping server processes and hence determine the JVM settings. For a standalone server, it's the responsibility of the process that started the server (e.g. passing them as command line arguments).

Managed Domain

In a managed domain the JVM settings can be declared at different scopes: For a specific server group, for a host or for a particular server. If not declared, the settings are inherited from the parent scope. This allows you to customize or extend the JVM settings within every layer.

Let's take a look at the JVM declaration for a server group:

(See domain/configuration/domain.xml)

In this example the server group "main-server-group" declares a heap size of 64m and a maximum heap size of 512m. Any server that belongs to this group will inherit these settings. You can change these settings for the group as a whole, or a specific server or host:

(See domain/configuration/host.xml)

In this case, server-two, belongs to the main-server-group and inherits the JVM settings named default, but declares a lower maximum heap size.

Standalone Server

For a standalone sever you have to pass in the JVM settings either as command line arguments when executing the $JBOSS_HOME/bin/standalone.sh script, or by declaring them in $JBOSS_HOME/bin/standalone.conf. (For Windows users, the script to execute is %JBOSS_HOME%/bin/standalone.bat while the JVM settings can be declared in %JBOSS_HOME%/bin/standalone.conf.bat.)

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 16, 2012

    How can we do the setting for JVM for per application. Suppose i have deployed the two application

    named demo1 and demo2. Now i want to do the JVM configuration for per application separately. Then is

    this possible in either standalone or domain server?.

    1. Dec 24, 2012

      An application is a server in the managed domain configuration. In standalone mode, the standalone is the application.

      In a managed domain, you may place a <jvm> element in a <server> element in the host.xml. See XSD (e.g., jboss-as-config_1_3.xsd) in docs/schema for all the subelements and attributes of jvm element.

      In a standalone server, JVM settings are configured in standalone.conf[.bat] as mentioned above, or possibly as env. properties.

  2. Sep 24, 2014

    I have tried to put some environment variable in standalone.conf.bat file like this:

    rem # Start Added by don for CXF SOAP Services

    set "JAVA_OPTS=%JAVA_OPTS -Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl -Djavax.xml.soap.SOAPConnectionFactory=weblogic.wsee.saaj.SOAPConnectionFactoryImpl"

    rem #JAVA_OPTS=%JAVA_OPTS -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParser=org.apache.xerces.jaxp.SAXParserImpl"

    set "JAVA_OPTS=%JAVA_OPTS -DWORKING_DIRECTORY=C:\app\cte\localinstall -Dcentral.tax.engine.db=java:jboss/centralTaxEngine -Dcte.payload.dump.dir=C:\app\cte\localinstall\dump -Dcte.config.dir=C:\app\cte\localinstall\config"

    set "JAVA_OPTS=%JAVA_OPTS -Dcxf.response.encryption.key=cte-itg.austin.hp.com -Dweb.config.dir=C:\app\cte\localinstall\config-fe"

    set "JAVA_OPTS=%$JAVA_OPTS -Dsynchro.tax.engine.db=jdbc.eTaxDB"

    rem #POST_CLASSPATH=C:\app\cte\localinstall\config

    rem #PRE_CLASSPATH=C:\app\cte\eclipseWS\centralTaxEngine\EarContent\APP-INF\lib\xalan.jar;C:\app\cte\eclipseWS\centralTaxEngine\EarContent\APP-INF\lib\xercesImpl.jar

    rem # End Added by don for CXF SOAP Services

    But inside my program when i am doing like this:

     

    System.getProperties("central.tax.engine.db"); i am not getting the value.

     

    Can any body help me here??