9.4 Modifying the JBoss configuration

The JBoss Application Server is configured using various XML configuration files. JBoss must be shut down before editing any of these configuration files. If JBoss is running and these files are changed, JBoss will probably crash. JBoss also has a few configuration files that are formatted as .property files. You must ensure that the .property files are saved as UNIX text files on Linux or Solaris if you edit these files on Windows environments at any time.

For single-server installations, you may use jboss profile located at [appserver root] \standalone\configuration as a template. For cluster installations, use jboss profile located at [appserver root] \domain\ as a template.

It is recommended that you make a copy of the profile (all or standard) and make changes to the copied profile.

9.4.1 Modify the JBoss configuration

Perform the following steps to modify the JBoss configuration to customize JBoss for AEM forms.

  • Modify EAR file class-loading isolation

  • Modify the standalone.conf.bat file (Windows)

  • Modify standalone.conf (Linux and Solaris)

9.4.1.1 Modify the standalone.conf.bat file (Windows only)

  1. Open the [appserver root] /bin/standalone.conf.bat file in an editor.

  2. Delete the text in bold in the following line and add the memory arguments for 64-bit JVM.

    set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MaxPermSize=256M"
    • Memory argument for 64-bit JVM:
      set ""JAVA_OPTS=%JAVA_OPTS% -Xms1024M -Xmx2048M -XX:MaxPermSize=768M"
  3. Add the following argument for 64-bit JVM:
    set "JAVA_OPTS=%JAVA_OPTS% -Dadobeidp.serverName=server1 -Dadobe.cache.multicast-port=33891 -Dfile.encoding=utf8 -Djava.net.preferIPv4Stack=true" 
    set "JAVA_OPTS=%JAVA_OPTS% -DentityExpansionLimit=10000 -Dcom.adobe.livecycle.crx.integration.url=http://localhost:8080" 
    set "JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError" 
    set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.net.protocol.file.useURI=false -Dorg.jboss.as.logging.per-deployment=false" 
    set "JAVA_OPTS=%JAVA_OPTS% -XX:+UseCompressedOop
  4. (Optional) Modify JBoss Application Server to run in IPv6 mode as follows:

    • Locate and modify -Djava.net.preferIPv4Stack=false

    • Insert the string -Djava.net.preferIPv6Stack=true

    Note: If the application server log contains the following error on startup, remove the value for the IPv6 stack and set the IPV4 value back to true :

    “13:37:44,488 WARN [HANamingService] Failed to start AutomaticDiscovery java.net.SocketException: bad argument for IP_MULTICAST_IF: address not bound to any interface at java.net.PlainDatagramSocketImpl.socketSetOption(Native Method)at java.net.PlainDatagramSocketImpl.setOption(PlainDatagramSocketImpl.java:260)”

  5. Save and close the file.

9.4.1.2 Modify the standalone.bat file (Windows only)

  1. Open the [appserver root] /bin/standalone.bat file in an editor.

  2. Modify the line immediately following rem Setup JBoss specific properties to set encoding to UTF-8:

        set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME%
Note: Ensure that no line breaks appear in this new line.
Note: These memory arguments are for both, domain controllers and process controllers, and should be set on each node of cluster.
  1. (Optional) Modify JBoss Application Server to run in IPv6 mode as follows:

    • Locate and modify -Djava.net.preferIPv4Stack=false

    • Insert the string -Djava.net.preferIPv6Stack=true

    Note: If the application server log contains the following error on startup, remove the value for the IPv6 stack and set the IPV4 value back to true :

    “13:37:44,488 WARN [HANamingService] Failed to start AutomaticDiscovery java.net.SocketException: bad argument for IP_MULTICAST_IF: address not bound to any interface at java.net.PlainDatagramSocketImpl.socketSetOption(Native Method)at java.net.PlainDatagramSocketImpl.setOption(PlainDatagramSocketImpl.java:260)”

  2. Save and close the file.

9.4.1.3 Modify jboss.cli.bat (windows)

  1. Open the [JBoss_root]\bin\jboss-cli.bat file for editing.

  2. Add double-quotes (“ ”) to the text in bold in the following line:

    set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=com.sun.java.swing -Dlogging.configuration=file: %JBOSS_HOME%\bin\jboss-cli-logging.properties"
  3. Save and close the file.

9.4.1.4 Modify the standalone.conf file (JBoss with Solaris 10, Red Hat 5.5, 64-bit only)

Solaris JDKs from Sun require an additional argument to use 64-bit features. Without this configuration change, the Sun JDK defaults to 32-bit support only.

Note: If you're running JBoss as a non-root user, use -Djava.io.tmpdir="location" to set the location of the temporary directory to a directory to which you have access.
  1. Open the [appserver root] /bin/standalone.conf file in an editor.

  2. Locate the section starting with:

    if [ "x$JAVA_OPTS" = "x" ]; then

    Modify the section to look like:

    if [ "x$JAVA_OPTS" = "x" ]; then 
       #JAVA_OPTS="-Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true" 
        JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx2048m -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true" 
        JAVA_OPTS="$JAVA_OPTS -Dadobeidp.serverName=server1 -Dfile.encoding=utf8 -Djava.net.preferIPv4Stack=true" 
        JAVA_OPTS="$JAVA_OPTS -DentityExpansionLimit=10000" 
        JAVA_OPTS="$JAVA_OPTS -XX:+UseCompressedOops -XX:+HeapDumpOnOutOfMemoryError"
    Note: Ensure that this entry appears as a single line in the standalone.conf file.
  3. (optional)Modify JBoss Application Server to run in IPv6 mode as follows:

    • Locate and modify -Djava.net.preferIPv4Stack=false

    • Add -Djava.net.preferIPv6Stack=true

  4. Save and close the file.

9.4.1.5 Modify domain.xml file (Windows and Unix)

  1. Open the [JBoss_root]/domain/configuration/domain_<DBType>.xml file for editing.

  2. Add the following system properties as a child of the <property name="java.net.preferIPv4Stack" value="true"/> node:
    <property name="com.arjuna.ats.arjuna.allowMultipleLastResources" value="true"/> 
    <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
  3. The domain.xml file contains four profiles such as default , ha , full , and full-ha . AEM forms on JEE configured on a Cluster for JBoss application server required only full profile. Search and delete the following nodes:

    • <profile name="default">

    • <profile name="ha">

    • <profile name="full-ha">

  4. To add and update logging properties:

    1. In the node <subsystem xmlns="urn:jboss:domain:logging:1.3"> , set the value of the child node <append value="true"/> to false .

    2. Add the following code after the </periodic-rotating-file-handler> node.

                   <logger category="com.adobe"> 
                          <level name="INFO"/> 
                      </logger> 
                      <logger category="org.springframework"> 
                          <level name="WARN"/> 
                      </logger> 
                      <logger category="org.mc4j.ems"> 
                          <level name="WARN"/> 
                      </logger>
    3. Add the following code as the child of the <subsystem xmlns="urn:jboss:domain:ee:1.1"> node

                   <global-modules> 
                          <module name="org.jgroups" slot="main"/> 
                          <module name="org.jacorb" slot="main"/> 
                      </global-modules>
  5. Locate the following text and add/change the value that appears in bold to 100:

    <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/> 
  6. locate the <subsystem xmlns="urn:jboss:domain:jacorb:1.3"> node, replace the child node <initializers transactions="spec" security="identity"/> with <initializers security="identity" transactions="spec"/>

  7. Locate the node

    <orb socket-binding="jacorb" ssl-socket-binding="jacorb-ssl"> 
           <initializers security="identity" transactions="spec"/> 
    </orb>

    and add the following lines after it.

    <properties> 
    <property name="jacorb.connection.client.pending_reply_timeout" value="360000"/> 
    </properties>
  8. Locate the following text and remove the text that appears in bold:

    <!--<remoting-connector use-management-endpoint="false"/>-->
  9. In the <subsystem xmlns="urn:jboss:domain:messaging:1.4"> node, locate the child node <address-settings> . In the child node, after the line <address-full-policy>PAGE</address-full-policy> , add the following text:

    <page-size-bytes>2097152</page-size-bytes>
  10. In the <subsystem xmlns="urn:jboss:domain:remoting:1.1"> node, remove the value that appears in bold:

    <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/> 
  11. Add the following lines as a child of the <interfaces> node:

    <interface name="any"> 
                <any-ipv4-address/> <!-- 0.0.0.0 --> 
    </interface>
  12. Locate and delete all the child nodes of all the <socket-binding-group > nodes for all the profiles.

  13. Locate and replace the child nodes of the <socket-binding-groups> nodes for all the profiles to

     <socket-binding-group name="full-sockets" default-interface="public"> 
                <!-- Needed for server groups using the 'default' profile  --> 
                <socket-binding name="http" interface="any" port="8080"/> 
                <socket-binding name="https" interface="any" port="8443"/> 
    <socket-binding name="jacorb" interface="public" port="3528"/> 
                <socket-binding name="remoting" interface="any" port="4447"/> 
    </socket-binding-group>
  14. Locate and delete all the child nodes of the <socket-binding-group name="ha-sockets" default-interface="public"> node for all the profiles.

  15. Locate and delete all the child nodes of the <socket-binding-group name="full-ha-sockets" default-interface="public"> node for all the profiles.

  16. Delete the following childs of the <server-groups> node:

    <server-group name="other-server-group" profile="full-ha"> 
                <jvm name="default"> 
                    <heap size="1303m" max-size="1303m"/> 
                    <permgen max-size="256m"/> 
                </jvm> 
                <socket-binding-group ref="full-ha-sockets"/> 
    </server-group>
  17. Change the heap size from <heap size="1303m" max-size="1303m"/> to <heap size="1024m" max-size="4096m"/> .

  18. Change the prem size from <permgen max-size="256m"/> to <permgen max-size="1024m"/> .

  19. Save and close the file.

Note: The memory arguments specified in the domain_db.xml file are used for server process fork on each node under other-server-group unless some specific configuration parameters is not set in host.xml

9.4.1.6 Modify the host.xml file

  1. Open the [JBoss_root]/domain/configuration/hosts.xml file for editing.

  2. Locate the <jvms> node and change the values in bold:

    <jvms> 
            <jvm name="default"> 
              <heap size="1024m" max-size="2048m"/> 
              <permgen size="256m" max-size="768m"/> 
                <jvm-options> 
                    <option value="-server"/> 
                </jvm-options> 
           </jvm>     </jvms>
  3. Locate the <server> node and delete the following child nodes:

     <server name="server-two" group="main-server-group" auto-start="true"> 
                <!-- server-two avoids port conflicts by incrementing the ports in 
                     the default socket-group declared in the server-group --> 
                <socket-bindings port-offset="150"/> 
            </server> 
            <server name="server-three" group="other-server-group" auto-start="false"> 
                <!-- server-three avoids port conflicts by incrementing the ports in 
                     the default socket-group declared in the server-group --> 
                <socket-bindings port-offset="250"/> 
            </server>
  4. Save and close the file.

Note: The memory arguments specified in the host.xml have more precedence over the memory arguments specified in the domain_db.xml file.

9.4.1.7 Modify the modules.xml file

  1. Open the module.xml file from the \Program Files\EAP-6.2.0\jboss-eap-6.2\modules\system\layers\base\sun\jdk\main directory for editing.

  2. Add the following tags to the file in the <paths> tag:

    <path name="com/sun/org/apache/xerces/internal/jaxp"/> 
    <path name="sun/net/util"/>
  3. Save and Close.

// Ethnio survey code removed