Learn Java EE 6 quickly using JBoss Central
Posted by snjeza in JBoss Tools on Dec 18, 2011 2:32:54 PMThe JBoss Central editor includes several quickstarts that provide a quick run-through of Java EE 6 features.
The quickstarts are based on amazing Pete Muir's JBoss AS7 quickstarts - JBoss AS 7.0 - Getting Started Developing Applications Guide
and are adapted to work with Eclipse/JBoss Tools.
This blog guides you how to install JBoss Tools 3.3 and start work with Java EE 6 using these tutorials.
Installing JBoss Tools 3.3
In order to install JBoss Tools 3.3, you need to perform the following steps:
- install Eclipse Java EE IDE for Web Developers
Download the appropriate archive for your OS, unpack it and start Eclipse.
- Call Help>Install New Software..., click the Add button and enter the following update site:
http://download.jboss.org/jbosstools/updates/development/indigo/
- select the Abridged JBoss Tools 3.3 category
Click Next, Next, check "I accept the terms of the license agreements" and click Finish.
- Wait for Eclipse to download and install the JBoss Tools 3.3.
- Restart Eclipse when required.
You have installed JBoss Tools 3.3.
JBoss Quickstarts (JBoss Central)
After Eclipse restarts, you will get the JBoss Central editor.
Expand the JBoss Quickstart widget in the Project Examples section
The helloworld, numberguess, login and kitchensink quickstarts will guide you through creating a Java EE 6 application.
Here I will describe to you how to create the helloworld application. The rest of the applications are used in a similar way, but they introduce new concepts as shown in the following figures:
The HTML5 is a template project that doesn't include any cheat sheet.
Helloworld quickstart
In order to create the helloworld Java EE 6 application, you have to do the following:
- click the Helloworld project example in the JBoss Central editor
- JBoss Tools will warn you that you have to install JBoss AS 7.0 or 7.1 in order to create, deploy and run this application.
If you have already installed and configured JBoss AS 7.x, you won't see any requirement and will be able to skip to the step 3.- If you have already downloaded JBoss AS 7.x, you will be able to configure it using the Install button.
Add the directory where you downloaded your JBoss AS and JBoss Tools will configure a JBoss AS 7.x server for you.
- If you don't have any JBoss AS 7.x server, click the Download and Install... button and JBoss Tools will, for you, download JBoss AS 7.0.2
- If you have already downloaded JBoss AS 7.x, you will be able to configure it using the Install button.
- When the JBoss AS is installed and configured, you will get the following dialog:
Click the Start button.
The jboss-as-helloworld project will be imported and you will get the helloworld cheat sheet that will help you to review the application.
Read the introduction to learn how the application works and click Click to Begin.
The following screen will appear:
After reading a detailed description, click Click when complete.
The HelloWorldServlet.java section explains the HelloWorld servlet in detail. When clicking the action, the cheat sheet will open the appropriate section of the code.
Run or skip all the actions in the HelloWorldServlet.java section. You will get the HelloService.java section.
Click Click to perform. The following screen will show up:
That's it. You are ready to deploy and run the application on the JBoss AS 7 server you previously installed and configured.
Click Click to performClick Next
Finally, click the Finish button.
The cheat sheet will start the server, deploy the application and open it in a browser.
In a similar way, you will be able to create and review the numberguess, login and kitchensink applications. Kitchensink is an especially interesting application. In addition to explaining many Java EE 6 features (CDI, JSF, EJB, JTA, Bean Validation, JAX-RS, Arquillian), it automatically runs an Arquillian test and enables you to create your starting project.
Some advanced Java EE developers might also be interested in reviewing this application.
Comments