JBoss EAP introduction

This excerpt from the Enterprise Application Server CookBook will guide you through the installation of JBoss EAP platform which is the Red Hat certified and supported release of the application server.

 

The JBoss EAP 6 platform bears some similarities with the AS 7 version such as:

  • Both server releases are based on the same level of Java EE specification, therefore Java EE 6 compliant applications are fully portable between the two application servers.
  • Both server releases have an open source code which can be freely downloaded and tested from developers.

There are however some differences between the JBoss AS 7.1.1 Community version and the EAP 6.1 such as:

  • The EAP 6 platform (just like JBoss AS 7) can be used as part of your development environment; however you are not allowed to use it in a production environment, unless you buy a subscription from Red Hat (http://www.redhat.com/contact/sales.html ).
  • The EAP 6 platform is derived from the AS 7 community version, however the modules contained in the EAP 6.1 platform are based on a more recent set of libraries which sometimes contain enhancements or bug fixings not part of the AS 7 version.
  • The structure of the EAP platform is almost identical to the AS 7 corresponding version, except for the module file system which anticipates a change available in the WildFly 8 module (See next chapter to learn more about the EAP file system)

The EAP platform can be as well downloaded from http://www.jboss.org/jbossas/downloads:

jboss eap tutorial jboss eap  

 

Before starting the download you will need to register (https://community.jboss.org/register.jspa ) and accept the terms of usage of the product.

Once completed the download, extract the archive to a folder and you are done with the installation.

unzip jboss-eap-6.1.0.zip

Starting JBoss EAP

 Before starting the EAP 6 platform, check that the following requirements are met on your machine:

  • Verify that you have installed Java (JDK/JRE) 1.6 or higher on your pc
  • Set the JAVA_HOME environment variable to the location where JAVA is installed. 

The application server ships with two server modes: standalone and domain mode. The difference between the two modes is not about the functionalities available but is related to the management of the application server: in particular, domain mode is used when you want a single point where you can control the configuration and management of your servers.

In order to start the application server using the default configuration in "standalone" mode, change directory to $JBOSS_HOME/bin and execute:

./standalone.sh

The equivalent command on Windows is:

standalone.bat

To start the application server using the default configuration in "domain" mode, execute the following command from the same path:

./domain.sh

Again, the equivalent command for Windows user is:

./domain.bat

When the startup process has completed, you should find something like this in the server console:

10:55:47,223 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management

10:55:47,224 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

10:55:47,226 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8) started in 31242ms - Started 123 of 177 services (53 services are passive or on-demand)

You can verify that the server is reachable from the network by simply pointing your browser to the application server's welcome page, which is reachable by default at the following address: http://localhost:8080

jboss eap jboss eap

Stopping JBoss EAP

The simplest and most unpleasant way to stop the application server is by sending an interrupt signal with Ctrl+C to the server console. However, if your application server process was launched in the background or rather is running on another machine, then you can use the Command Line Interface (CLI) interface tool to issue an immediate shutdown command. The CLI interface can be started from the $ JBOSS_HOME/bin folder of your installation:

./jboss-cli.sh

Once there, issue the “connect” command (no credentials will be required if you are attempting to connect to the server located on your same host).

[disconnected /] connect

Connected to localhost:9999

Now issue the :shutdown command that will stop the application server:

[localhost:9999 /] :shutdown

The shutdown command can be executed also in no-interactive mode, using the following syntax:

jboss-cli.sh --connect command=:shutdown  
Francesco Google+