Summary: The quickstarts demonstrate Java EE 6 and a few additional technologies from the JBoss stack. They provide small, specific, working examples that can be used as a reference for your own project.
These quickstarts run on Red Hat JBoss Enterprise Application Platform 6.1 or later. We recommend using the JBoss EAP ZIP file. This version uses the correct dependencies and ensures you test and compile against your runtime environment.
Be sure to read this entire document before you attempt to work with the quickstarts. It contains the following information:
-
Available Quickstarts: List of the available quickstarts and details about each one.
-
Suggested Approach to the Quickstarts: A suggested approach on how to work with the quickstarts.
-
System Requirements: List of software required to run the quickstarts.
-
Configure Maven: How to configure the Maven repository for use by the quickstarts.
-
Run the Quickstarts: General instructions for building, deploying, and running the quickstarts.
-
Run the Arquillian Tests: How to run the Arquillian tests provided by some of the quickstarts.
-
Optional Components: How to install and configure optional components required by some of the quickstarts.
The list of all currently available quickstarts can be found here: http://site-jdf.rhcloud.com/quickstarts/get-started/. The table lists each quickstart name, the technologies it demonstrates, gives a brief description of the 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 the Prerequisites column. If a quickstart lists prerequisites, those must be installed or deployed before working with the quickstart.
Quickstarts with tutorials in the Get Started Developing Applications are noted with two asterisks ( ** ) following the quickstart name.
Note: Some of these quickstart use the H2 database included with JBoss EAP 6. It is a lightweight, relational example datasource that is used for examples only. It is not robust or scalable and should NOT be used in a production environment!
[TOC-quickstart]
We suggest you approach the quickstarts as follows:
- Regardless of your level of expertise, we suggest you start with the helloworld quickstart. It is the simplest example and is an easy way to prove your server is configured and started correctly.
- If you are a beginner or new to JBoss, start with the quickstarts labeled Beginner, then try those marked as Intermediate. When you are comfortable with those, move on to the Advanced quickstarts.
- Some quickstarts are based upon other quickstarts but have expanded capabilities and functionality. If a prerequisite quickstart is listed, be sure to deploy and test it before looking at the expanded version.
The applications these projects produce are designed to be run on Red Hat JBoss Enterprise Application Platform 6.1 or later.
To run these quickstarts with the provided build scripts, you need the following:
-
Java 1.6, to run JBoss EAP and Maven. You can choose from the following:
- OpenJDK
- Oracle Java SE
- Oracle JRockit
-
Maven 3.0.0 or newer, to build and deploy the examples
-
If you have not yet installed Maven, see the Maven Getting Started Guide for details.
-
If you have installed Maven, you can check the version by typing the following in a command prompt:
mvn --version
-
-
The JBoss EAP distribution ZIP.
- For information on how to install and run JBoss, refer to the product documentation located on the Customer Portal here: https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/.
-
You can also use JBoss Developer Studio or Eclipse to run the quickstarts.
The root folder of each individual quickstart contains a README file with specific details on how to build and run the example. In most cases you do the following:
See the README file in each individual quickstart folder for specific details and information on how to run and access the example.
Note: If you do not configure the Maven settings as described here, Configure Maven, you must pass the configuration setting on every Maven command as follows: -s QUICKSTART_HOME/settings.xml
In most cases, you can use the following steps to build the application to test for compile errors or to view the contents of the archive. See the specific quickstart README file for complete details.
- Open a command prompt and navigate to the root directory of the quickstart you want to build.
- Use this command if you only want to build the archive, but not deploy it:
-
If you have configured the Maven settings :
mvn clean install
-
If you have NOT configured settings Maven settings:
mvn clean install -s QUICKSTART_HOME/settings.xml
-
In most cases, you can use the following steps to build and deploy the application. See the specific quickstart README file for complete details.
-
Make sure you start the JBoss EAP server as described in the quickstart README file.
-
Open a command prompt and navigate to the root directory of the quickstart you want to run.
-
Use this command to build and deploy the archive:
-
If you have configured the Maven settings :
mvn clean install jboss-as:deploy
-
If you have NOT configured the Maven settings :
mvn clean install jboss-as:deploy -s QUICKSTART_HOME/settings.xml
-
The command to undeploy the quickstart is simply:
mvn jboss-as:undeploy
You can verify the quickstarts build using one command. However, quickstarts that have complex dependencies must be skipped. For example, the jax-rs-client quickstart is a RESTEasy client that depends on the deployment of the helloworld-rs quickstart. As noted above, the root pom.xml
file defines a complex-dependencies
profile to exclude these quickstarts from the root build process.
To build the quickstarts:
-
Do not start the JBoss EAP server.
-
Open a command prompt and navigate to the root directory of the quickstarts.
-
Use this command to build the quickstarts that do not have complex dependencies:
-
If you have configured the Maven settings :
mvn clean install '-Pdefault,!complex-dependencies'
-
If you have NOT configured the Maven settings :
mvn clean install '-Pdefault,!complex-dependencies' -s QUICKSTART_HOME/settings.xml
-
Note: If you see a java.lang.OutOfMemoryError: PermGen space
error when you run this command, increase the memory by typing the following command for your operating system, then try the above command again.
For Linux: export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"
For Windows: SET MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"
To undeploy the quickstarts from the root of the quickstart folder, you must pass the argument -fae
(fail at end) on the command line. This allows the command to continue past quickstarts that fail due to complex dependencies and quickstarts that only have Arquillian tests and do not deploy archives to the server.
You can undeploy quickstarts using the following procedure:
-
Start the JBoss EAP server.
-
Open a command prompt and navigate to the root directory of the quickstarts.
-
Use this command to undeploy any deployed quickstarts:
mvn jboss-as:undeploy -fae
To undeploy any quickstarts that fail due to complex dependencies, follow the undeploy procedure described in the quickstart's README file.
You can also deploy the quickstarts from Eclipse using JBoss tools. For more information on how to set up Maven and the JBoss tools, refer to the JBoss Enterprise Application Platform Development Guide or Get Started Developing Applications.
The following components are needed for only a small subset of the quickstarts. Do not install or configure them unless the quickstart requires it.
-
Create Users Required by the Quickstarts: Add a Management or Application user for the quickstarts that run in a secured mode.
-
Configure the PostgreSQL Database for Use with the Quickstarts: The PostgreSQL database is used for the distributed transaction quickstarts.
-
Configure Byteman for Use with the Quickstarts: This tool is used to demonstrate crash recovery for distributed transaction quickstarts.