Free Sample
+ Collection

Java EE 7 Developer Handbook

Starting
Peter A. Pilgrim

Update your knowledge of the Enterprise Java platform through this user-friendly tutorial that’s designed around real-life examples. The pragmatic approach means you’ll be up to speed almost effortlessly. For intermediate users upwards.
$35.99
$59.99
RRP $35.99
RRP $59.99
eBook
Print + eBook

Want this title & more?

$16.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849687942
Paperback634 pages

About This Book

  • Learn about local and remote service endpoints, containers, architecture, synchronous and asynchronous invocations, and remote communications in a concise reference
  • Understand the architecture of the Java EE platform and then apply the new Java EE 7 enhancements to benefit your own business-critical applications
  • Learn about integration test development on Java EE with Arquillian Framework and the Gradle build system
  • Learn about containerless builds featuring the GlassFish 4.0 embedded application server
  • Master Java EE 7 with this example-based, up-to-date guide with descriptions and explanations

Who This Book Is For

"Java EE 7 Developer Handbook" is for the developer, designer, and architect aiming to get acquainted with the Java EE platform in its newest edition. This guide will enhance your knowledge about the Java EE 7 platform. Whether you are a long-term Java EE (J2EE) developer or an intermediate level engineer on the JVM with just Java SE behind you, this handbook is for you, the new contemporary Java EE 7 developer!

Table of Contents

Chapter 1: Java EE 7 HTML5 Productivity
Java EE 7
Enhanced HTML5 support
Java EE 7 architecture
Java EE Platform
A working example
Summary
Chapter 2: Context and Dependency Injection
Software engineering definitions
The Context and Dependency Injection service
Standalone CDI application
Building the standalone project with Gradle
Using the DeltaSpike CDI container tests
Injecting arbitrary objects using Producers
Advanced CDI
The Arquillian test framework
CDI and crosscutting concerns
Summary
Chapter 3: Enterprise Java Beans
EJB protocols
Features of EJB components
Session beans
The lifecycle of session EJBs
Business interfaces
EJB references
Asynchronous invocations
The relationship between EJB and CDI containers
Lightweight scope of EJBs
Summary
Chapter 4: Essential Java Persistence API 3.2
Entities
Running a simple entity bean test
The lifecycle of an entity bean
EntityManager
Moving further along with entity beans
JPQL
The entity bean relationships
Configuration of persistence and the entity beans
Summary
Chapter 5: Object-Relational Mapping with JPA
Adding finesse to entity beans
Entity relationships revisited
Mapping entity inheritance hierarchy
Extended entities
Troubleshooting entity persistence
Summary
Chapter 6: Java Servlets and Asynchronous Request-Response
What are Java Servlets?
Getting started with Java Servlets
Request and response
The web deployment descriptor
The Servlet filters
The Servlet context listener
Pluggable Servlet fragments
Asynchronous Java Servlets
Alignment to the containers
Miscellaneous features
Summary
Chapter 7: Java API for HTML5WebSocket
The rise of WebSockets
Server-side Java WebSockets
Java WebSocket API
A Java WebSocket chat server
Client-side Java WebSockets
Programmatic Java WebSocket
Encoders and decoders
Summary
Chapter 8: RESTful Services JAX-RS 2.0
Representational State Transfer
Architectural style
Servlet mapping
JAX-RS server-side endpoints
JAX-RS subresources
Generating a JAX-RS generic response
JAX-RS client API
Asynchronous JAX-RS server side endpoints
JAX-RS providers
Filters
Summary
Chapter 9: Java Message Service 2.0
What is JMS?
JMS definitions
A quick JMS 2.0 example
Establishing a JMS connection
Sending JMS messages
Receiving JMS messages
Message-driven Beans (MDBs)
JMS exception handling
Upgrading JMS 1.1 code
JMS and dependency injection
Summary
Chapter 10: Bean Validation
Introduction to Bean Validation
Constraint declarations
Applying constraint definitions
Constraint inheritance
Ordering groups of constraints
Method-level constraints
Integration with Java EE
Summary
Chapter 11: Advanced Topics in Persistence
Persistence of map collections
Calling stored procedures
Understanding the criteria API
Entity graphs
Miscellaneous features
Summary

What You Will Learn

  • Understand the JSR and the API that are assembled together for Java EE 7
  • Write server side and client side WebSocket connection in Java
  • Understand the essential differences and similarities between the EJB and CDI containers, as well as dependency injection
  • Learn about Gradle builds, embedded containers, and the Arquillian Framework
  • Build server side endpoints with EJB in stateless, stateful, and singleton modes
  • Write REST server side endpoints on the client and server side
  • Write asynchronous Servlet input and output and also annotated Servlet, Context Listeners
  • Map entities in Java Persistence with the essential cardinalities including the Java side of many-to-many relationships
  • Learn about mapping entities to stored procedures and entity graphs
  • Fully understand how to verify your POJO before they hit the database with Bean Validation API
  • Be prepared for the Java EE 8 journey and beyond, which may include deployment to the cloud

In Detail

The seventh edition of the Enterprise Java platform is aimed at helping Java engineers take advantage of the advancements in HTML5 and web standards. Web Sockets, asynchronous input and output with Servlets, and strong type safety through the CDI containers will ensure that Java EE 7 remains popular for server-side applications.
If you are a user aiming to get acquainted with the Java EE 7 platform, this book is for you.

"Java EE 7 Developer Handbook" provides a solid foundation of knowledge for developers to build business applications. Following the lead of Agile practices, there is a focus on writing tests to demonstrate test-driven development principles, using the embedded GlassFish 4.0 container examples and the Gradle build system. You will learn about CDI, EJB, JPA, JMS, MDB, Servlets, WebSocket, JAX-RS, Bean Validation, and so much more.

"Java EE 7 Developer Handbook" is designed as a companion to the professional software developer who quickly needs to lookup some working code, understand the basics of the framework, and then go out and fulfill the business contract with the customer. Typically, engineers are under pressure to develop professional code that is of high quality and contains a low number of bugs. Java EE 7 Developer Handbook relies heavily on the Arquillian framework to illustrate how much easier it is to write Java EE tests, and together with the modern practice of writing containerless applications that actually embed an application container, developing agile Java EE suddenly becomes reasonable, smart, pragmatic, and achievable.

You will start off with an overview of the Java EE platform: the containers, the design, and architecture. From there, you can follow the path of the CDI, the true gem of the framework, and then the server side end point, EJB. It is completely up to you when and if you want to learn about Java persistence. However, don’t miss out on the highlights of Java EE 7 such as WebSocket, Bean Validation, and asynchronous Servlet API.

"Java EE 7 Developer Handbook" is a vertical slice through standard Java enterprise architecture. If you have been wondering why developers have invested so much time and effort into learning topics such as Enterprise Java Beans, you will quickly understand why when you find out the difference between stateful and stateless Beans. Best of all, this book covers the topic from the perspective of new API and new modern practices. For instance, you, the developer and designer, are expected to write applications with annotations in comparison with J2EE. Java EE 7 Developer Handbook incorporates helpful hints and tips to get the developer up to speed in a short amount of time on EJB, CDI, Persistence, Servlet, JMS, WebSocket, JAX-RS and Bean Validation, and much more.

"Java EE 7 Developer Handbook" is the reference guide you need beside you at your desk.

Authors

Read More