Java EE 7 with GlassFish 4 Application Server

For Java developers who want to learn Java EE, you’ll find this practical guide makes it all quite simple. Starting with the installation of Glassfish 4 application server, you’ll then progress to developing powerful applications for it.

Java EE 7 with GlassFish 4 Application Server

Progressing


For Java developers who want to learn Java EE, you’ll find this practical guide makes it all quite simple. Starting with the installation of Glassfish 4 application server, you’ll then progress to developing powerful applications for it.
$32.99
$54.99
RRP $32.99
RRP $54.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 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 139781782176886
Paperback348 pages

About This Book

  • Install and configure GlassFish 4
  • Covers all major Java EE 7 APIs and includes new additions such as JSON Processing
  • Packed with clear, step-by-step instructions, practical examples, and straightforward explanations.

Who This Book Is For

If you are a Java developers who wants to become proficient with Java EE 7, this book is ideal for you. Readers are expected to have some experience with Java and to have developed and deployed applications in the past, but don’t need any previous knowledge of Java EE or J2EE.

Table of Contents

Chapter 1: Getting Started with GlassFish
An Overview of Java EE and GlassFish
Obtaining GlassFish
Installing GlassFish
Starting GlassFish
GlassFish domains
Setting up Database Connectivity
Summary
Chapter 2: JavaServer Faces
Introduction to JSF
Developing our first JSF application
Custom data validation
Customizing JSF's default messages
Ajax-enabling JSF applications
JSF 2.2 HTML5 support
JSF 2.2 Faces Flows
Additional JSF component libraries
Summary
Chapter 3: Object Relational Mapping with JPA
The CustomerDB database
Introducing the Java Persistence API
Final notes
Summary
Chapter 4: Enterprise JavaBeans
Introduction to session beans
Message-driven beans
Transactions in Enterprise JavaBeans
Enterprise JavaBean life cycles
Introduction to the EJB Timer Service
EJB Security
Summary
Chapter 5: Contexts and Dependency Injection
Named beans
Dependency injection
Working with CDI Qualifiers
Named bean scopes
Summary
Chapter 6: JSON Processing with JSON-P
The JSON-P Model API
The JSON-P Streaming API
Summary
Chapter 7: WebSockets
Developing a WebSocket server endpoint
Developing WebSocket clients
Additional information about the Java API for WebSocket
Summary
Chapter 8: The Java Message Service
Setting up GlassFish for JMS
Working with message queues
Working with message topics
Summary
Chapter 9: Securing Java EE Applications
Security realms
Summary
Chapter 10: Web Services with JAX-WS
Developing web services with the JAX-WS API
Exposing EJBs as web services
Securing web services
Securing EJB web services
Summary
Chapter 11: Developing RESTful Web Services with JAX-RS
Introducing RESTful web services and JAX-RS
Developing a simple RESTful web service
Developing a RESTful web service client
Working with query and path parameters
Summary

What You Will Learn

  • Develop web-based applications using JavaServer Faces (JSF) 2.2
  • Interact with databases via the Java Persistence API (JPA) 2.1
  • Create SOAP and RESTful web services via JAX_WS and JAX-RS APIs
  • Develop Enterprise JavaBeans (EJBs), including session and message-driven beans
  • Integrate enterprise application layers via Contexts and Dependency Injection (CDI) API
  • Generate and parse JavaScript Object Notation (JSON) data via the JSON-P API
  • Make WebSocket applications via the standard Java EE 7 WebSocket API

In Detail

GlassFish is a free, open source application server which supports all the major Java features such as Enterprise JavaBeans, JPA, JavaServer Faces, JMS, RMI, JavaServer Pages, and servlets. It is the first Java EE 7 compliant application server. All major Java EE technologies and API's are covered in this version of Java. GlassFish server allows the user to work with the extensile, adaptable, and lightweight Java EE 7 platform.

This book explores the installation and configuration of GlassFish, and then moves on to Java EE 7 application development, covering all major Java EE 7 APIs. It focuses on going beyond the basics to develop Java applications deployed to the GlassFish 4 application server. The book covers all major Java EE 7 APIs including JSF 2.2, EJB 3.2, CDI 1.1, the Java API for WebSocket, JAX-WS, JAX-RS and more.

The book also introduces JSON-P, the Java API for JSON (Javascript Object Notation) Processing. This advanced topic deals with how the two APIs are used to process JSON function, namely the Model API and the Streaming API. Apart from revisiting Java Server Faces (JSF), it explains why Facelets, the new features introduced in modern versions of JSF, are the preferred view technology over Java Server Pages (JSP)

The later chapters explore competing implementations of the WebSocket standard in Java, describing the updates in JMS; which aims to provide a simpler API and reduction in boilerplate code among a host of other features. Readers will also learn how to secure Java EE applications by taking advantage of GlassFish's built-in security features. Finally, we learn more about the RESTful web service development using the JAX-RS specification.

Authors

Table of Contents

Chapter 1: Getting Started with GlassFish
An Overview of Java EE and GlassFish
Obtaining GlassFish
Installing GlassFish
Starting GlassFish
GlassFish domains
Setting up Database Connectivity
Summary
Chapter 2: JavaServer Faces
Introduction to JSF
Developing our first JSF application
Custom data validation
Customizing JSF's default messages
Ajax-enabling JSF applications
JSF 2.2 HTML5 support
JSF 2.2 Faces Flows
Additional JSF component libraries
Summary
Chapter 3: Object Relational Mapping with JPA
The CustomerDB database
Introducing the Java Persistence API
Final notes
Summary
Chapter 4: Enterprise JavaBeans
Introduction to session beans
Message-driven beans
Transactions in Enterprise JavaBeans
Enterprise JavaBean life cycles
Introduction to the EJB Timer Service
EJB Security
Summary
Chapter 5: Contexts and Dependency Injection
Named beans
Dependency injection
Working with CDI Qualifiers
Named bean scopes
Summary
Chapter 6: JSON Processing with JSON-P
The JSON-P Model API
The JSON-P Streaming API
Summary
Chapter 7: WebSockets
Developing a WebSocket server endpoint
Developing WebSocket clients
Additional information about the Java API for WebSocket
Summary
Chapter 8: The Java Message Service
Setting up GlassFish for JMS
Working with message queues
Working with message topics
Summary
Chapter 9: Securing Java EE Applications
Security realms
Summary
Chapter 10: Web Services with JAX-WS
Developing web services with the JAX-WS API
Exposing EJBs as web services
Securing web services
Securing EJB web services
Summary
Chapter 11: Developing RESTful Web Services with JAX-RS
Introducing RESTful web services and JAX-RS
Developing a simple RESTful web service
Developing a RESTful web service client
Working with query and path parameters
Summary

Book Details

ISBN 139781782176886
Paperback348 pages
Read More