IBM Application Pattern Type for Java: RAP application on JBoss

As you can deploy application on Jetty (see: IBM Application Pattern Type for Java: RAP application on Jetty) on the IBM SmartCloud Application Workload Service, you can also deploy application on JBoss.
There is only 2 tweaks to do in the JBoss configuration, one for the CLI management port (if you would like to use it) and the second the public IP address..

For this article, I will use JBoss AS7 in standalone mode.

The management port have to be changed because the default management port is already used by SCAWS/IWD (Infocenter).

As by default JBoss only accept request from localhost and we will not know the hostname/IP address associated with our server, we have to open the request to all IPs but don’t worry, there is a way to limit the access while designing the pattern.

First download the JBoss distribution and unzip it in a temporary directory.

Edit the file <JBoss_Distri>/standalone/configuration/standalone.xml and modify the lines:

       <gtsocket-binding name=”management-native” interface=”management” port=”${jboss.management.native.port:9999}”/>

by
<socket-binding name=”management-native” interface=”management” port=”${jboss.management.native.port:9998}”/>

and
<interface name=”public”>
<inet-address value=”${jboss.bind.address:127.0.0.1}”/>
</interface>
by
<interface name=”public”>
<any-address/>
</interface>

Finally, you can re-create a zip with the <JBoss_Distri> directory.

Now, the process is very similar than IBM Application Pattern Type for Java: RAP application on Jetty the only differences are on the:

1) In the Java Application:
1.1) The archive file: You have to upload your customized JBoss  distribution.
1.2) The command-line should be /<JBoss_Distri>/bin/standalone.sh
2) The war deployment path is /<JBoss_Distri>/standalone/deployments
3) Monitored file, the log directory is: /<JBoss_Distri>/server/default/log

SCAWS Java Pattern JBoss

Now, you can deploy it and test.

SCAWSJavaJettyRunApp