Book Image

Digital Java EE 7 Web Application Development

By : Peter Pilgrim
Book Image

Digital Java EE 7 Web Application Development

By: Peter Pilgrim

Overview of this book

Digital Java EE 7 presents you with an opportunity to master writing great enterprise web software using the Java EE 7 platform with the modern approach to digital service standards. You will first learn about the lifecycle and phases of JavaServer Faces, become completely proficient with different validation models and schemes, and then find out exactly how to apply AJAX validations and requests. Next, you will touch base with JSF in order to understand how relevant CDI scopes work. Later, you’ll discover how to add finesse and pizzazz to your digital work in order to improve the design of your e-commerce application. Finally, you will deep dive into AngularJS development in order to keep pace with other popular choices, such as Backbone and Ember JS. By the end of this thorough guide, you’ll have polished your skills on the Digital Java EE 7 platform and be able to creat exiting web application.
Table of Contents (21 chapters)
Digital Java EE 7 Web Application Development
About the Author
About the Reviewers

Application servers

At the time of writing, there are several popular application servers that are certified as Java EE 7 compliant: GlassFish, WildFly, Payara, Cosminexus, and TMax Jeus 8. The reference implementation for the entire umbrella specification is GlassFish 4.1 ( In 2013, I devoted the entire sister book and source code example, Java EE 7 Developer Handbook, to GlassFish, because it was the only server available. GlassFish is built on open source, there is a public issue tracker, many forums on various Java EE topics, and because Oracle supports the host and the repository of the source code, it works out of the box.

In order to be certified as a Java EE 7 application server, the vendor or open source provider must pass the Test Compatibility Kit, which guarantees a certification list of compliance ( The code written only against Java EE 7 standard APIs must be able to run against a compliant server else the word standard wouldn't hold any meaning. The basic principle of Java: write once run-everywhere, ought be achievable. The fly in the ointment is when the code relies on vendor-specific features that are not part of the standard. It is also worth pointing out that TCK is not free. In fact, I know a very good source of information, who mentioned the cost to be at least $250 K. Therefore, this barrier to entry is beyond the remit of the majority of open source projects or Small & Medium Enterprises (SME), without significant investment from angels or kick-starter funds.

At the beginning of 2014, Oracle announced that it would be removing the commercial support for the GlassFish server. This news had the Java EE community up-in-arms about the future of the application server. Oracle clarified later that there was a roadmap for GlassFish 5, and it was still on the agenda to be the reference implementation for Java EE 8. The database vendor and Java steward instead recommended the avenue of upgrading to Oracle WebLogic for production. In 2014, Oracle released WebLogic 12.1.3 with selected Java EE 7 compliant components.

WildFly 9 ( is the next generation of application servers from Red Hat. The server features a modular architecture based on a new class loader infrastructure in an attempt to avoid the issue of conflicting dependencies between the third party JARs and the infrastructure within the server itself. There are two key benefits to WildFly: the new high performance HTTP server, which is called Undertow ( and the reduction of administration ports. The ports are 8080 for web traffic, Servlets, REST, and WebSocket endpoint and 9990 for server administration. With WildFly it is possible to invoke the EJB remote methods through the de facto HTTP port 8080, which adds some interesting possibilities for enterprise applications.

The modular approach in WildFly 9 appears to be suitable for end sites that prefer to have a strict control over the deployment of their enterprise architecture. WildFly has a download option called the core distribution, which allows developers to configure the modules that they require in an application server runtime. The final benefit of WildFly is that it is the first Java EE 7 server that is compatible with Java SE 8 (Lambdas and default interfaces). Only GlassFish 4.1 releases are compatible with Java SE 8.

After the debacle of the professional support for GlassFish, another corporation entered the space. C2B2 Consulting offered an open source adaptation of GlassFish called Payara Server ( with 24/7 production support.

I should quickly mention one other server that is gaining track with the server-side Java community and that is worth keeping an eye on in the near future. The Apache Software Foundation has an open source project called Tom EE ( Tom EE (pronounced Tommy) is, essentially, Apache Tomcat 7 with additional extensions, which are already configured, to support JSF, JPA JAX-RS, CDI, and EJB. David Blevins, a popular speaker and an ASF committer, was the founder of the Tom EE project. At the time of writing, Tom EE is only certified against Java EE 6 Web Profile; however, there are plans to add support to Java EE 7. Business stakeholders can obtain commercial and production support for Tom EE through vendors like Tomi Tribe (

Since GlassFish, WildFly, and Payara are the only application servers certified as Java EE 7-compliant at the time of writing, we will concentrate only on them for the rest of this book. The source code examples work with both these servers. Wherever necessary, we will point out the differences and explain the features appropriately. Let us now continue our journey into the digital web with Java EE 7.