The quickstarts demonstrate Java EE 7 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.

Introduction

These quickstarts run on Red Hat JBoss Enterprise Application Platform 7.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.

Make sure you read this entire document before you attempt to work with the quickstarts. It contains the following information:

Use of EAP_HOME and JBOSS_HOME Variables

The quickstart README files use the replaceable value EAP_HOME to denote the path to the JBoss EAP installation. When you encounter this value in a README file, make sure you replace it with the actual path to your JBoss EAP installation. The installation path is described in detail here: Use of EAP_HOME and JBOSS_HOME Variables.

Available Quickstarts

All available quickstarts can be found here: https://developers.redhat.com/quickstarts/eap/. You can review the technologies demonstrated by the quickstart. You can also view the required experience level. Click on the quickstart to see more detailed information about how to run it. Some quickstarts require deployment of other quickstarts. This information is noted in the Prerequisites section of the quickstart README file.

Note
Some of these quickstarts use the H2 database included with JBoss EAP. It is a lightweight, relational example datasource that is used for examples only. It is not robust or scalable, is not supported, and should NOT be used in a production environment!
Quickstart Name Demonstrated Technologies Description Experience Level Required Prerequisites

batch-processing

CDI, Batch 1.0, JSF

The batch-processing quickstart shows how to use chunk oriented batch jobs to import a file to a database.

Intermediate

none

bmt

EJB, BMT

The bmt quickstart demonstrates Bean-Managed Transactions (BMT), showing how to manually manage transaction demarcation while accessing JPA entities.

Intermediate

none

cmt

EJB, CMT, JMS

The cmt quickstart demonstrates Container-Managed Transactions (CMT), showing how to use transactions managed by the container.

Intermediate

none

contacts-jquerymobile

jQuery Mobile, jQuery, JavaScript, HTML5, REST

The contacts-jquerymobile quickstart demonstrates a Java EE 7 mobile database application using HTML5, jQuery Mobile, JAX-RS, JPA, and REST.

Beginner

none

ejb-in-war

EJB, JSF, WAR

The ejb-in-war quickstart demonstrates how to package an EJB bean in a WAR archive and deploy it to JBoss EAP. Arquillian tests are also provided.

Intermediate

none

ejb-timer

EJB Timer

The ejb-timer quickstart demonstrates how to use the EJB timer service @Schedule and @Timeout annotations with JBoss EAP.

Beginner

none

greeter

CDI, JSF, JPA, EJB, JTA

The greeter quickstart demonstrates the use of CDI, JPA, JTA, EJB and JSF in JBoss EAP.

Beginner

none

helloworld

CDI, Servlet

The helloworld quickstart demonstrates the use of CDI and Servlet 3 and is a good starting point to verify JBoss EAP is configured correctly.

Beginner

none

helloworld-html5

CDI, JAX-RS, HTML5

The helloworld-html5 quickstart demonstrates the use of CDI 1.2 and JAX-RS 2.0 using the HTML5 architecture and RESTful services on the backend.

Beginner

none

helloworld-mdb

JMS, EJB, MDB

The helloworld-mdb quickstart uses JMS and EJB Message-Driven Bean (MDB) to create and deploy JMS topic and queue resources in JBoss EAP.

Intermediate

none

helloworld-rs

CDI, JAX-RS

The helloworld-rs quickstart demonstrates a simple Hello World application, bundled and deployed as a WAR, that uses JAX-RS to say Hello.

Intermediate

none

helloworld-singleton

EJB, Singleton

The helloworld-singleton quickstart demonstrates an EJB Singleton Bean that is instantiated once and maintains state for the life of the session.

Beginner

none

hibernate

Hibernate

The hibernate quickstart demonstrates how to use Hibernate ORM 5 API over JPA, using Hibernate-Core and Hibernate Bean Validation, and EJB.

Intermediate

none

jaxrs-client

JAX-RS

The jaxrs-client quickstart demonstrates JAX-RS Client API, which interacts with a JAX-RS Web service that runs on JBoss EAP.

Beginner

none

jsonp

CDI, JSF, JSON-P

The jsonp quickstart demonstrates how to use the JSON-P API to produce object-based structures and then parse and consume them as stream-based JSON strings.

Beginner

none

kitchensink

CDI, JSF, JPA, EJB, JAX-RS, BV

The kitchensink quickstart demonstrates a Java EE 7 web-enabled database application using JSF, CDI, EJB, JPA, and Bean Validation.

Intermediate

none

kitchensink-angularjs

AngularJS, CDI, JPA, EJB, JPA, JAX-RS, BV

The kitchensink-angularjs quickstart demonstrates a Java EE 7 application using AngularJS with JAX-RS, CDI, EJB, JPA, and Bean Validation.

Intermediate

none

kitchensink-jsp

JSP, JSTL, CDI, JPA, EJB, JAX-RS, BV

The kitchensink-jsp quickstart demonstrates how to use JSP, JSTL, CDI, EJB, JPA, and Bean Validation in JBoss EAP.

Intermediate

none

kitchensink-ml

CDI, JSF, JPA, EJB, JAX-RS, BV, i18n, l10n

The kitchensink-ml quickstart demonstrates a localized Java EE 7 compliant application using JSF, CDI, EJB, JPA, and Bean Validation.

Intermediate

none

logging-tools

JBoss Logging Tools

The logging-tools quickstart shows how to use JBoss Logging Tools to create internationalized loggers, exceptions, and messages and localize them.

Beginner

none

managed-executor-service

EE Concurrency Utilities, JAX-RS, JAX-RS Client API

The managed-executor-service quickstart demonstrates how Java EE applications can submit tasks for asynchronous execution.

Beginner

none

numberguess

CDI, JSF

The numberguess quickstart demonstrates the use of CDI (Contexts and Dependency Injection) and JSF (JavaServer Faces) in JBoss EAP.

Beginner

none

payment-cdi-event

CDI, JSF

The payment-cdi-event quickstart demonstrates how to create credit and debit CDI Events in JBoss EAP, using a JSF front-end client.

Beginner

none

servlet-async

Asynchronous Servlet, CDI, EJB

The servlet-async quickstart demonstrates how to use asynchronous servlets to detach long-running tasks and free up the request processing thread.

Intermediate

none

servlet-filterlistener

Servlet Filter, Servlet Listener

The servlet-filterlistener quickstart demonstrates how to use Servlet filters and listeners in an application.

Intermediate

none

spring-greeter

Spring MVC, JSP, JPA

The spring-greeter quickstart is based on the greeter quickstart, but differs in that it uses Spring MVC for Mapping GET and POST requests.

Beginner

none

spring-kitchensink-basic

JSP, JPA, JSON, Spring, JUnit

The spring-kitchensink-basic quickstart is an example of a Java EE 7 application using JSP, JPA and Spring 4.x.

Intermediate

none

spring-kitchensink-springmvctest

JSP, JPA, JSON, Spring, JUnit

The spring-kitchensink-springmvctest quickstart demonstrates how to create an MVC application using JSP, JPA and Spring 4.x.

Intermediate

none

spring-resteasy

Resteasy, Spring

The spring-resteasy quickstart demonstrates how to package and deploy a web application that includes resteasy-spring integration.

Beginner

none

tasks-jsf

JSF, JPA

The tasks-jsf quickstart demonstrates how to use JPA persistence with JSF as the view layer.

Intermediate

tasks

temperature-converter

CDI, JSF, SLSB EJB

The temperature-converter quickstart does temperature conversion using an EJB Stateless Session Bean (SLSB), CDI, and a JSF front-end client.

Beginner

none

thread-racing

Batch, CDI, EE Concurrency, JAX-RS, JMS, JPA, JSON, Web Sockets

A thread racing web application that demonstrates technologies introduced or updated in the latest Java EE specification.

Beginner

none

websocket-client

Web Socket, CDI Events, JSON, SSL

Demonstrates use of a Javascript WebSocket client, WebSocket configuration, programmatic binding, and secure WebSocket.

Intermediate

none

websocket-endpoint

CDI, WebSocket, JSON-P

Shows how to use WebSockets with JSON to broadcast information to all open WebSocket sessions in JBoss EAP.

Beginner

none

websocket-hello

WebSocket, CDI, JSF

The websocket-hello quickstart demonstrates how to create a simple WebSocket application.

Beginner

none

xml-jaxp

JAXP, SAX, DOM, Servlet

The xml-jaxp quickstart demonstrates how to use Servlet and JSF to upload an XML file to JBoss EAP and validate and parse it using DOM or SAX.

Intermediate

none

Suggested Approach to the Quickstarts

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, make sure you deploy and test it before looking at the expanded version.

System Requirements

The applications these projects produce are designed to be run on Red Hat JBoss Enterprise Application Platform 7.1 or later.

All you need to build these projects is Java 8.0 (Java SDK 1.8) or later and Maven 3.3.1 or later. See Configure Maven to Build and Deploy the Quickstarts to make sure you are configured correctly for testing the quickstarts.

To run these quickstarts with the provided build scripts, you need the JBoss EAP distribution ZIP. For information on how to install and run JBoss, see the Red Hat JBoss Enterprise Application Platform Documentation Getting Started Guide located on the Customer Portal.

You can also run the quickstarts in JBoss Developer Studio or Eclipse.

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:

Build and Deploy the Quickstarts

See the README file in each individual quickstart folder for specific details and information on how to run and access the example.

Build the Quickstart Archive

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.

  1. Open a terminal and navigate to the root directory of the quickstart you want to build.

  2. Use the following command if you only want to build the archive, but not deploy it.

    $ mvn clean install

Build and Deploy the Quickstart

This section describes the basic steps to build and deploy an application. See the specific instructions in each quickstart README file for any variations to this process.

  1. Make sure you start the JBoss EAP server as described in the quickstart README file.

  2. Open a terminal and navigate to the root directory of the quickstart you want to run.

  3. Use the following command to build and deploy the archive.

    $ mvn clean install wildfly:deploy

Undeploy an Archive

Use the following command to undeploy the quickstart.

$ mvn wildfly:undeploy

Verify the Quickstarts Build with One Command

You can verify the quickstarts build using one command. However, quickstarts that have complex dependencies must be skipped. For example, the resteasy-jaxrs-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 all of the quickstarts:

  1. Do not start the JBoss EAP server.

  2. Open a terminal and navigate to the root directory of the quickstarts.

  3. Use the following command to build the quickstarts that do not have complex dependencies:

    $ mvn clean install '-Pdefault,!complex-dependencies'

Undeploy the Deployed Quickstarts with One Command

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:

  1. Start the JBoss EAP server.

  2. Open a terminal and navigate to the root directory of the quickstarts.

  3. Use the following command to undeploy any deployed quickstarts.

    $ mvn wildfly:undeploy -fae

To undeploy any quickstarts that fail due to complex dependencies, follow the undeploy procedure described in the quickstart’s README file.

Run the Quickstarts in Red Hat JBoss Developer Studio or Eclipse

You can also start the server and deploy the quickstarts or run the Arquillian tests from Eclipse using JBoss tools. For general information about how to import a quickstart, add a JBoss EAP server, and build and deploy a quickstart, see Use JBoss Developer Studio or Eclipse to Run the Quickstarts.

Optional Components

The following components are needed for only a small subset of the quickstarts. Do not install or configure them unless the quickstart requires it.