-
Language:
English
-
Language:
English
Getting Started Guide
For Use with Red Hat JBoss Enterprise Application Platform 6
Edition 1
Nidhi Chaudhary
Lucas Costi
Russell Dickenson
Sande Gilda
Vikram Goyal
Eamon Logue
Darrin Mison
Scott Mumford
David Ryan
Misty Stanley-Jones
Keerat Verma
Tom Wells
Abstract
Chapter 1. Introduction
1.1. About Red Hat JBoss Enterprise Application Platform 6
1.2. About the Red Hat Customer Portal
- Manage and maintain Red Hat entitlements and support contracts;
- Download officially-supported software;
- Access product documentation and the Red Hat Knowledgebase;
- Contact Global Support Services; and
- File bugs against Red Hat products.
1.3. About the Red Hat JBoss Developer Program
1.4. About the Full Red Hat JBoss Commercial Program
1.5. How to Find More Information
Chapter 2. Prerequisites
2.1. JBoss EAP 6 Installation Prerequisites
JBoss EAP is available under the Red Hat JBoss Developer Program or the Full Red Hat JBoss Commercial Program. For more information about the Red Hat JBoss Developer Program, see Section 1.3, “About the Red Hat JBoss Developer Program”. For more information about the Full Red Hat JBoss Commercial Program. see Section 1.4, “About the Full Red Hat JBoss Commercial Program”. The following steps describe the prerequisites for both programs.
Common Prerequisites
- Review the supported configurations and ensure your system is supported: https://access.redhat.com/site/articles/111663.
- If you set up an account on the Red Hat Customer Portal and are participating in the Full Red Hat JBoss Commercial Program, ensure that your system is up to date with Red Hat issued updates and errata.
ZIP/Installer Prerequisites
- You must grant administration privileges for the installation directory.
- Ensure that the chosen JDK has been extracted (or installed). See the JDK documentation for information on how to do this.
- On Microsoft Windows Server, ensure that the JAVA_HOME and PATH environment variables have been set, otherwise shortcuts will not work.
- On Hewlett-Packard HP-UX, ensure that an
unzip
utility has been installed.
Chapter 3. Download and Install the Product
3.1. JBoss EAP Installation Overview
- You can install JBoss EAP using the graphical installation program.
- You can install JBoss EAP using a ZIP file.
3.2. Download and Install JBoss EAP Using the Graphical Installation Program
3.2.1. Download the JBoss EAP 6 Installation Program
JBoss EAP is available under the Red Hat JBoss Developer Program or the Full Red Hat JBoss Commercial Program. Follow the procedure below that matches your program choice.
Procedure 3.1. Download the JBoss EAP Installation Program from the Customer Portal under the Full Red Hat JBoss Commercial Program
- Open a browser and log into https://access.redhat.com.
- Select Downloads from the menu at the top of the page.
- Find
Red Hat JBoss Middleware
and click the Download Software button. - Select Application Platform from the Product drop-down menu that appears on the next screen.
- Find
Red Hat JBoss Enterprise Application Platform 6.x.x Installer
in the list and click Download. - You are prompted to save the JAR file to a directory of your choice. Choose a directory and save the file.
The JBoss EAP 6 installation program JAR file has been downloaded successfully to the target machine.
3.2.2. Run the JBoss EAP Installation Program
Procedure 3.2. Run the JBoss EAP Installation Program
- Open a terminal and navigate to the directory containing the downloaded installation program JAR.
- Type the following command:
java -jar jboss-eap-6.3.0.jar
- Follow the instructions in the table below.
Table 3.1. JBoss EAP Installation Program Screens
Screen name
|
When it Appears
|
Description
|
---|---|---|
Always
|
Choose the desired language for the installation program and click OK.
| |
Always
|
The EULA for RED HAT JBOSS MIDDLEWARE.
Select "I accept the terms of this license agreement", and click Next.
| |
Always
|
Select the installation path for JBoss EAP and click Next. You are prompted to create the new directory, or, if it exists, to replace the named directory.
| |
Always
|
Create an administrative user and assign a password. Then click Next.
| |
Always
|
Install the quickstart examples. Choose Yes and select the installation path. Then click Next.
| |
If you choose to install the quickstart examples
|
A publicly hosted Maven repository is available for use with the quickstarts. This is the easiest way to run the quickstarts.
Click Next to skip Maven repository setup. You receive a warning that a Maven repository is required. Maven configuration instructions are provided later in this document, so you can safely click Yes to continue.
| |
Always
|
Select the packs to install. Click Next to continue.
| |
Always
|
Keep the default port bindings, then click Next.
| |
Always
|
Select the startup option required on completion of the installation process. Then click Next.
| |
Always
|
Choose No to skip configuration of logging levels. Then click Next.
| |
Always
|
Review your selections and click Next.
| |
Always
|
This screen displays the component installation progress.
Upon completion, click Next.
| |
Always
|
Choose Do not perform additional post-install configuration. Then click Next.
| |
Always
|
When processing completes, click Next.
| |
Always
|
Accept the default and click Next.
| |
Always
|
Accept the default and click Next.
| |
Installation complete
|
Always
|
Click Done.
|
The installation is complete and JBoss EAP 6 is installed on your target machine.
3.3. Download and Install JBoss EAP Using the ZIP
3.3.1. Download JBoss EAP 6 (ZIP Installation)
JBoss EAP is available under the Red Hat JBoss Developer Program or the Full Red Hat JBoss Commercial Program. Follow the procedure below that matches your program choice.
Procedure 3.3. Download the ZIP file from the Customer Portal under the Full Red Hat JBoss Commercial Program
- Open a browser and log into https://access.redhat.com.
- Select Downloads from the menu at the top of the page.
- Find
Red Hat JBoss Middleware
and click the Download Software button. - Select Application Platform from the Product drop-down menu that appears on the next screen.
- Find
Red Hat JBoss Enterprise Application Platform 6.x.x
in the list and click Download. - You are prompted to save the ZIP file to a directory of your choice. Choose a directory and save the file.
Procedure 3.4. Download the ZIP file from jboss.org under the Red Hat JBoss Developer Program
- Open a browser and access the following URL: http://www.jboss.org/products/.
- Find Red Hat JBoss Enterprise Application Platform in the list.
- Click on the Download Now button.
- You are prompted to save the ZIP file to a directory of your choice. Choose a directory and save the file.
The JBoss EAP 6 ZIP file has been downloaded successfully to the target machine.
3.3.2. Install JBoss EAP 6 (ZIP Installation)
This topic covers the steps to install JBoss EAP 6 using the downloaded ZIP file.
Procedure 3.5. ZIP File Installation
Move the ZIP archive to the desired location.
Move the ZIP file to the server and directory where you plan to install JBoss EAP 6. The user who will start and stop the server must have read and write access to this directory.Use an appropriate application to extract the ZIP archive to the desired location.
In a Red Hat Enterprise Linux environment, use theunzip
utility to extract the contents of the ZIP archive.In a Microsoft Windows environment, right-click the file and select Extract All.In a Hewlett-Packard HP-UX environment, use theunzip
utility to extract the contents of the ZIP archive.
JBoss EAP 6 has been installed successfully. The directory created by extracting the ZIP archive is the top-level directory for the server. This is referred to as EAP_HOME
.
3.4. Download the Quickstart Code Examples
3.4.1. Download the Quickstarts
JBoss EAP 6 comes with a comprehensive set of quickstart code examples designed to help users begin writing applications using the Java EE 6 technologies.
Procedure 3.6. Download the Quickstarts under the Full Red Hat JBoss Commercial Program
- Open a browser and log into https://access.redhat.com.
- Find
Red Hat JBoss Middleware
and click the Download Software button. - Select Application Platform from the Product drop-down menu that appears on the next screen.
- Find
Red Hat JBoss Enterprise Application Platform 6.x.x Quickstarts
in the list and click Download. - You are prompted to save the ZIP file to a directory of your choice. Choose a directory and save the file.
- Unzip the archive in a directory of your choosing.
Procedure 3.7. Download the Quickstarts under the Red Hat JBoss Developer Program
- Open a web browser and access this URL: http://www.jboss.org/jdf/quickstarts/get-started/
- Click the Download button to download a Zip archive containing the examples.
- Unzip the archive in a directory of your choosing.
Chapter 4. Post-install Instructions
4.1. Set Up the Development Environment
4.1.1. JBoss Developer Studio Installation Overview
4.1.2. Download JBoss Developer Studio
- Find Red Hat JBoss Developer Studio in the list.
- Click the Download Now button. You are prompted to save the ZIP file to a directory of your choice.
4.1.3. Install JBoss Developer Studio
- Open a terminal and navigate to the directory containing the downloaded
.jar
file. - Run the following command to launch the GUI installation program:
java -jar jbdevstudio-build_version.jar
Note
Alternatively, you may be able to double-click the.jar
file to launch the installation program. - Click Next to start the installation process.
- Select I accept the terms of this license agreement and click Next.
- Adjust the installation path and click Next.
Note
If the installation path folder does not exist, a prompt will appear. Click Ok to create the folder. - Choose a JVM, or leave the default JVM selected, and click Next.
- JBoss Developer Studio includes JBoss Enterprise Application Platform. If it was previously installed, choose No. Otherwise, choose Yes to install and configure it for use with JDBS.
- Review the installation details, and click Next.
- Click Next when the installation process is complete.
- Configure the desktop shortcuts for JBoss Developer Studio, and click Next.
- Click Done.
4.1.4. Start JBoss Developer Studio
Procedure 4.1. Command to start JBoss Developer Studio
- Open a terminal and navigate to the JBoss Developer Studio installation directory.
- Run the following command to start the JBoss Developer Studio:For Linux:
[localhost]$ ./jbdevstudio
For Microsoft Windows:C:\JDBS_INSTALL_DIRECTORY > jbdevstudio.bat
4.1.5. Add the JBoss EAP Server Using Runtime Detection
Procedure 4.2. Define a Server Using Runtime Detection
- Click Window→Preferences, expand JBoss Tools and select JBoss Runtime Detection.
Figure 4.1. JBoss Runtime Detection Pane
- Click Add.
- Select the directory containing the JBoss Enterprise Application Platform 6.2 installation and click OK. The directory is now scanned to find JBoss Enterprise Application Platform 6.2 application servers.
Figure 4.2. JBoss Enterprise Application Platform 6.x Found by Runtime Detection
- Be sure the jboss-eap-6.2 check box is selected and click OK.
- Click Apply to create a server for JBoss Enterprise Application Platform 6.2. Then click OK to close the Preferences window. The server is listed in the Servers view.
Figure 4.3. JBoss Enterprise Application Platform 6.2 Server Listed in Servers View
- The server is initially shown in stopped mode. The server starts automatically when you deploy a quickstart. To manually start the server, right-click jboss-eap-6.2 and click Start. After a short pause, the view switches to the Console view and shows the startup output of the server.
4.1.6. Add the JBoss EAP Server Using Define New Server
Procedure 4.3. Add the server
- Open the Servers tab. If there is no Servers tab, add it to the panel as follows:
- Click Window → Show View → Other....
- Select Servers from the Server folder and click OK.
- Click on the link to create a new server or right-click within the blank Server panel and select New → Server.
Figure 4.4. Add a new server - No servers available
- Expand JBoss Enterprise Middleware and choose JBoss Enterprise Application Platform 6.1+. In the same dialog, click on the Add... link to define the new server runtime environment and click Next.
Figure 4.5. Define a New Server
- Click Browse and navigate to your JBoss EAP install location. Then click Next.
Figure 4.6. Add New Server Runtime Environment
- Review the new JBoss EAP Server definition and click Next to continue.
Figure 4.7. Review the New Server Definition
- On this screen you define the server behavior. You can start the server manually or let JBoss Developer Studio manage it for you. You can also define a remote server for deployment and determine if you want to expose the management port for that server, for example, if you need connect to it using JMX. In this example, we assume the server is local and you want JBoss Developer Studio to manage your server so you do not need to check anything. Click Next.
Figure 4.8. Define the New JBoss Server Behavior
- This screen allows you to configure existing projects for the new server. Because you do not have any projects at this point, click Finish.
Figure 4.9. Modify resources for the new JBoss server
The JBoss EAP Runtime Server is listed in the Servers tab.

Figure 4.10. Server appears in the server list
4.2. Configure Maven
4.2.1. About Maven
4.2.2. Configure the Maven Settings
4.2.3. Configure Maven for JBoss Developer Studio
4.2.3.1. Configure Maven for Use with JBoss Developer Studio
Procedure 4.4. Configure Maven in JBoss Developer Studio
- Click Window→Preferences, expand JBoss Tools and select JBoss Maven Integration.
Figure 4.11. JBoss Maven Integration Pane in the Preferences Window
- Click Configure Maven Repositories.
- Click Add Repository to configure the JBoss GA Tech Preview Maven repository. Complete the
Add Maven Repository
dialog as follows:- Set the Profile ID, Repository ID, and Repository Name values to
jboss-ga-repository
. - Set the Repository URL value to
http://maven.repository.redhat.com/techpreview/all
. - Click the Active by default checkbox to enable the Maven repository.
- Click OK
Figure 4.12. Add Maven Repository - JBoss Tech Preview
- Click Add Repository to configure the JBoss Early Access Maven repository. Complete the
Add Maven Repository
dialog as follows:- Set the Profile ID, Repository ID, and Repository Name values to
jboss-earlyaccess-repository
. - Set the Repository URL value to
http://maven.repository.redhat.com/earlyaccess/all/
. - Click the Active by default checkbox to enable the Maven repository.
- Click OK
Figure 4.13. Add Maven Repository - JBoss Early Access
- Review the repositories and click Finish.
Figure 4.14. Review Maven Repositories
- You are prompted with the message "Are you sure you want to update the file 'MAVEN_HOME/settings.xml'?". Click Yes to update the settings. Click OK to close the dialog.The JBoss EAP Maven repository is now configured for use with JBoss Developer Studio.
4.2.4. Configure Maven for Command Line
4.2.4.1. Download and Install Maven
- Go to Apache Maven Project - Download Maven and download the latest distribution for your operating system.
- See the Maven documentation for information on how to download and install Apache Maven for your operating system.
4.2.4.2. Configure the Maven Settings for Use with Command Line
- You can copy the preconfigured
settings.xml
file that ships with the quickstarts. - You can manually edit the Maven
settings.xml
file.
You must install Maven before you configure the settings. For more information, see: Section 4.2.4.1, “Download and Install Maven”
Procedure 4.5. Configure Maven Using the Settings Shipped with the Quickstart Examples
settings.xml
file that is configured to use the online JBoss EAP Maven repository. If you have downloaded the quickstarts, this is the easiest way to configure the settings.
- This procedure overwrites the existing Maven settings file, so you must back up the existing Maven
settings.xml
file.- Locate the Maven install directory for your operating system. It is usually installed in
USER_HOME/.m2/
directory.- For Linux or Mac, this is:
~/.m2/
- For Windows, this is:
\Documents and Settings\USER_NAME\.m2\
or\Users\USER_NAME\.m2\
- If you have an existing
USER_HOME/.m2/settings.xml
file, rename it or make a backup copy so you can restore it later.
- If have not yet downloaded the quickstarts, follow the instructions here: Section 3.4.1, “Download the Quickstarts”.
- Copy the
QUICKSTART_HOME/settings.xml
file to theUSER_HOME/.m2/
directory. - If you modify the
settings.xml
file while JBoss Developer Studio is running, follow the procedure at the end of this topic entitled Refresh the JBoss Developer Studio User Settings.
Procedure 4.6. Manually Edit and Configure the Maven Settings To Use the Online JBoss EAP Maven Repository
- Locate the Maven install directory for your operating system. It is usually installed in
USER_HOME/.m2/
directory.- For Linux or Mac, this is
~/.m2/
- For Windows, this is
\Documents and Settings\USER_NAME\.m2\
or\Users\USER_NAME\.m2\
- If you do not find a
settings.xml
file, copy thesettings.xml
file from theUSER_HOME/.m2/conf/
directory into theUSER_HOME/.m2/
directory. - Copy the following XML into the
<profiles>
element of the file.<!-- Configure the JBoss GA Maven repository --> <profile> <id>jboss-ga-repository</id> <repositories> <repository> <id>jboss-ga-repository</id> <url>http://maven.repository.redhat.com/techpreview/all</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jboss-ga-plugin-repository</id> <url>http://maven.repository.redhat.com/techpreview/all</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> <!-- Configure the JBoss Early Access Maven repository --> <profile> <id>jboss-earlyaccess-repository</id> <repositories> <repository> <id>jboss-earlyaccess-repository</id> <url>http://maven.repository.redhat.com/earlyaccess/all/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jboss-earlyaccess-plugin-repository</id> <url>http://maven.repository.redhat.com/earlyaccess/all/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile>
Copy the following XML into the<activeProfiles>
element of thesettings.xml
file.<activeProfile>jboss-ga-repository</activeProfile> <activeProfile>jboss-earlyaccess-repository</activeProfile>
- If you modify the
settings.xml
file while JBoss Developer Studio is running, follow the procedure at the end of this topic entitled Refresh the JBoss Developer Studio User Settings.
Procedure 4.7. Refresh the JBoss Developer Studio User Settings
settings.xml
file while JBoss Developer Studio is running, you must refresh the user settings.
- From the menu, choose Window → Preferences.
- In the Preferences Window, expand Maven and choose User Settings.
- Click the Update Settings button to refresh the Maven user settings in JBoss Developer Studio.
Figure 4.15. Update Maven User Settings
Important
- Missing artifact ARTIFACT_NAME
- [ERROR] Failed to execute goal on project PROJECT_NAME; Could not resolve dependencies for PROJECT_NAME
~/.m2/repository/
subdirectory on Linux, or the %SystemDrive%\Users\USERNAME\.m2\repository\
subdirectory on Windows.
Chapter 5. Try It Out
5.1. Run the Quickstarts
5.1.1. Run the Quickstarts in JBoss Developer Studio
Procedure 5.1. Import the quickstarts into JBoss Developer Studio
- If you have not yet done so, Section 4.2.4.2, “Configure the Maven Settings for Use with Command Line”.
- Start JBoss Developer Studio.
- From the menu, select File → Import.
- In the selection list, choose Maven → Existing Maven Projects, then click Next.
Figure 5.1. Import Existing Maven Projects
- Browse to the directory of the quickstart you plan to test, for example the
helloworld
quickstart, and click OK. The Projects list box is populated with thepom.xml
file of the selected quickstart project.Figure 5.2. Select Maven Projects
- Click Finish.
Procedure 5.2. Build and Deploy the helloworld
quickstart
helloworld
quickstart is one of the simplest quickstarts and is a good way to verify that the JBoss server is configured and running correctly.
- If you do not see a Servers tab, add it the panel as follows:
- Click Window → Show View → Other....
- Select Servers from the Server folder and click OK.
- Right-click on the
jboss-helloworld
project in the Project Explorer tab and select Run As. You are provided with a list of choices. Select Run on Server.Figure 5.3. Run As - Run on Server
- Select jboss-eap-6.2 from the server list and click Next.
Figure 5.4. Run on Server
- The next screen displays the resources that are configured on the server. The
jboss-helloworld
quickstart is configured for you. Click Finish to deploy the quickstart.Figure 5.5. Modify Resources Configured on the Server
- Review the results.
- In the
Server
tab, the JBoss EAP 6.2 Runtime Server status changes to[Started, Republish]
. - The server Console tab shows messages detailing the JBoss EAP 6.2 server start and the helloworld quickstart deployment.
- A helloworld tab appears displaying the URL http://localhost:8080/jboss-helloworld/HelloWorld and the text "Hello World!".
- The following messages in the Console confirm deployment of the
jboss-helloworld.war
file:JBAS018210: Register web context: /jboss-helloworld JBAS018559: Deployed "jboss-helloworld.war" (runtime-name : "jboss-helloworld.war")
The registered web context is appended tohttp://localhost:8080
to provide the URL used to access the deployed application.
- To verify the
helloworld
quickstart deployed successfully to the JBoss server, open a web browser and access the application at this URL: http://localhost:8080/jboss-helloworld
5.1.2. Run the Quickstarts Using a Command Line
Procedure 5.3. Build and Deploy the Quickstarts Using a Command Line
- If you have not yet done so, Section 4.2.4.2, “Configure the Maven Settings for Use with Command Line”.
Review the
README
file in the root directory of the quickstarts.This file contains general information about system requirements, how to configure Maven, how to add users, and how to run the Quickstarts. Be sure to read through it before you get started.It also contains a table listing the available quickstarts. The table lists each quickstart name and the technologies it demonstrates. It gives a brief description of each quickstart and the level of experience required to set it up. For more detailed information about a quickstart, click on the quickstart name.Some quickstarts are designed to enhance or extend other quickstarts. These are noted in thePrerequisites
column. If a quickstart lists prerequisites, you must install them first before working with the quickstart.Some quickstarts require the installation and configuration of optional components. Do not install these components unless the quickstart requires them.Run the
helloworld
quickstart.Thehelloworld
quickstart is one of the simplest quickstarts and is a good way to verify that the JBoss server is configured and running correctly. Open theREADME
file in the root of thehelloworld
quickstart. It contains detailed instructions on how to build and deploy the quickstart and access the running applicationRun the other quickstarts.
Follow the instructions in theREADME
file located in the root folder of each quickstart to run the example.
Appendix A. Installation Program Screen Shots
A.2. End User License Agreement

Figure A.2. JBoss EAP Installation Program End User License Agreement
A.4. Administrative User Creation

Figure A.4. JBoss EAP Installation Program Administrative User Creation
A.5. Quickstart Installation

Figure A.5. JBoss EAP Installation Program Quickstart Setup
A.6. Maven Repository Setup

Figure A.6. JBoss EAP Installation Program Skip Maven Repository Installation

Figure A.7. JBoss EAP Installation Program Configure Maven Repository Installation
A.8. Socket Binding Setup

Figure A.9. JBoss EAP Installation Program Default Socket Bindings
A.10. Configure Logging Levels

Figure A.11. JBoss EAP Installation Program Configure Logging Levels
A.11. Review Installation Components

Figure A.12. JBoss EAP Installation Program Review Selected Components
A.12. Installation Progress

Figure A.13. JBoss EAP Installation Program Component Installation Progress
A.13. Post-Install Configuration

Figure A.14. JBoss EAP Installation Program Skip Post-Install Configuration
A.16. Generate Install Script

Figure A.17. JBoss EAP Installation Program Generate Install Script
Appendix B. Revision History
Revision History | |||
---|---|---|---|
Revision 2.0-08 | Mon Mar 17 2014 | Sande Gilda | |
|