Java EE 7 was released last year, Java EE 8 preparations have already started, so what tempts me to write a blog about Java EE 6 ?
A few reasons …
- Even though Java EE 5 was the first version where some of the specs were updated to simplify the platform, Java EE 6 is where higher productivity became the primary focus and kicked into high gear.
- All commercially available application servers are still Java EE 6 compliant.
- Java EE 7 is pretty cool and provide an awesome bunch of new technologies like WebSocket, Batch, JSON, and Concurrency. But customers are still sticking around with older version of the platform because these applications, servers, and environments cannot change overnight.
So if you are looking for a real-world Java EE 6 sample application that:
- Use Eclipse for building a Java EE 6 application
- Build persistence layer with JPA2 and Bean Validation
- Build business services with JAX-RS
- Building the User Interface with HTML5
- Building Administration UI with JBoss Forge
- Building statistics dashboard using HTML5 and JavaScript
- Hybrid mobile version of the app using Apache Cordova
In addition, it also shows:
- Deploy your application on a local instance or a remote instance running in OpenShift
- Run tests against your JBoss instance
Ticket Monster is your ultimate source. It not only shows how the key Java EE 6 technologies can be used together but also integrate jQuery, HTML5, and mobile version of the application as well.
The video below gives a quick preview of the application:
An instance of Ticket Monster can be previewed at ticketmonster-jdf.rhcloud.com or timo-milestogo.rhcloud.com.
So how do you get started ?
- Download Ticket Monster 2.6.0 (with tutorials). Corresponding source code is at github.com/jboss-developer/ticket-monster/tree/2.6.0.Final-with-tutorials.
- Set up Red Hat Maven repositories as explained here. If you don’t care reading through the instructions, overwrite
.m2/settings.xml
with this settings.xml. - Build the WAR of your application
123mvn clean package - To run on local JBoss instance:
- Download JBoss EAP 6.3
- Unzip and start as
123./bin/standalone.sh - Deploy the application as
123mvn package jboss-as:deploy
This will also build the application again.
- To run on JBoss instance in OpenShift
- Create a JBoss EAP 6 application in OpenShift
- Add PostgreSQL cartridge for this application
- Create an archive as
123mvn clean package -Ppostgresql-openshift
This will use the installed PostgreSQL cartridge for persistence. - Clone the git workspace from OpenShift
123
The actual git url will be specific to your application. - Copy generated WAR file to git workspace and rename to ROOT.war
123cp target/ticket-monster.war <openshift-git-workspace>/deployments/ROOT.war - Remove existing source and pom.xml from git workspace, add WAR, and push
1234567git rm -rf srcgit rm pom.xmlgit add deployments/ROOT.wargit commit . -m"deploying TicketMonster"git push - Access the application at htp://<appname-domainname>.rhcloud.com.The following video shows the steps for running TicketMonster on OpenShift:
Ask your questions about Ticket Monster at .
Enjoy!