Chapter 2. Network

By default, the Enterprise Platform binds to all networking addresses at start-up. You can specify a bind address, as well as a UDP address, at start-up.

Table 2.1. Network-related start-up options

-b [IP-ADDRESS]
Specifies the address the application server binds to. If unspecified, the application server binds to all addresses.
-u [IP-ADDRESS]
UDP multicast address. Optional. If not specified, only TCP is used.
-m [MULTICAST_PORT_ADDRESS]
UDP multicast port. Only used by JGroups.

2.1. Enabling IPv6

JBoss Enterprise Application Platform supports IPv4 and IPv6 networking on the application server. The default configuration uses IPv4. To enable IPv6, you need to follow Procedure 2.1, “Enabling IPv6 networking in Linux / UNIX” or Procedure 2.2, “Enabling IPv6 networking in Windows” depending on your operating system.

Note

If you need to use the Transaction Service, IPv6 networking is not supported.

Procedure 2.1. Enabling IPv6 networking in Linux / UNIX

Before you enable IPv6 networking on your application server, enable IPv6 networking for your operating system.
To enable IPv6 networking on your application server, do the following:
  1. Edit JBOSS_HOME/jboss-as/bin/run.sh.

    Comment out the java.net.preferIPv4Stack parameter. In the default run.sh file, this is line 93:
    92   # Force use of IPv4 stack
    93   # JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
    

    Note

    You cannot pass the java.net.preferIPv4Stack variable at the command line because it is a Java parameter, not a parameter to the application server itself. Therefore, you must change it in the run.sh file.
  2. Remove JBoss Transactions from your profile.

    Do not deploy the Transaction Service into your Application Server. To prevent the deployment of the Transaction Service, remove the following deployers:
    • JBOSS_HOME/jboss-as/conf/PROFILE/deploy/transaction-service.xml
    • JBOSS_HOME/jboss-as/conf/PROFILE/deploy/transaction-jboss-beans.xml
    • JBOSS_HOME/jboss-as/conf/PROFILE/conf/jbossts-properties.xml
  3. Bind the application server to your system's IPv6 address.

    Specify the IPv6 address the application server should bind to. Enclose the address in square brackets ([]):
    ./run.sh -b [IPv6 address] -u [IPv6 mcast address]

Procedure 2.2. Enabling IPv6 networking in Windows

Before you enable IPv6 networking on your application server, enable IPv6 networking in your operating system.
To enable IPv6 networking on your application server, do the following:
  1. Edit JBOSS_HOME/jboss-as/bin/run.bat.

    Comment out the java.net.preferIPv4Stack parameter. In the default run.bat file, this is line 109:
    108   rem Force use of IPv4 stack
    109   rem set JAVA_OPTS=%JAVA_OPTS% -Djava.net.preferIPv4Stack=true
    

    Note

    You cannot pass the java.net.preferIPv4Stack variable at the command line because it is a Java parameter, not a parameter to the application server itself. Therefore, you must change it in the run.bat file.
  2. Remove JBoss Transactions from your profile.

    Do not deploy the Transaction Service into your Application Server. To prevent the deployment of the Transaction Service, remove the following deployers:
    • JBOSS_HOME\jboss-as\conf\PROFILE\deploy\transaction-service.xml
    • JBOSS_HOME\jboss-as\conf\PROFILE\deploy\transaction-jboss-beans.xml
    • JBOSS_HOME\jboss-as\conf\PROFILE\conf\jbossts-properties.xml
  3. Bind the application server to your system's IPv6 address.

    Specify the IPv6 address the application server should bind to. Enclose the address in square brackets ([]):
    run.bat -b [IPv6 address] -u [IPv6 mcast address]