PacktLib: Java EE 7 Developer Handbook

Java EE 7 Developer Handbook

Credits

About the Author

Acknowledgment

About the Reviewers

www.PacktPub.com

Preface

Java EE 7 HTML5 Productivity

Java EE 7

Enhanced HTML5 support

Java EE 7 architecture

Java EE Platform

A working example

Summary

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

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

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

Object-Relational Mapping with JPA

Adding finesse to entity beans

Entity relationships revisited

Mapping entity inheritance hierarchy

Extended entities

Troubleshooting entity persistence

Summary

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

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

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

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

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

Advanced Topics in Persistence

Persistence of map collections

Calling stored procedures

Understanding the criteria API

Entity graphs

Miscellaneous features

Summary

Java EE 7 Platform

Java EE 7 Platform

Java EE 7 Platform

Java EE 7 Platform

Java EE 7 Persistence

Java EE 7 Persistence

Java EE 7 Persistence

Java EE 7 Persistence

Java EE 7 Transactions

Java EE 7 Transactions

Java EE 7 Transactions

Java EE 7 Assorted Topics

Java EE 7 Assorted Topics

Java EE 7 Assorted Topics

Java EE 7 Assorted Topics

Index