Book Image

Java EE 7 Development with NetBeans 8

By : David R Heffelfinger
5 (1)
Book Image

Java EE 7 Development with NetBeans 8

5 (1)
By: David R Heffelfinger

Overview of this book

Table of Contents (18 chapters)
Java EE 7 Development with NetBeans 8
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Java EE 7, the latest version of the Java EE specification, adds several new features to simplify enterprise application development. New versions of existing Java EE APIs have been included in this latest version of Java EE. JSF 2.2 has been updated to better support wizard-like interfaces via FacesFlows and has been enhanced to better support HTML5. NetBeans supports JPA 2.1 features such as Bean Validation and many others. EJB session beans can be automatically generated by NetBeans, allowing us to easily leverage EJB features such as transactions and concurrency. CDI advanced features such as qualifiers, stereotypes, and others can be easily implemented via NetBeans' wizards. JMS 2.0 has been greatly simplified, allowing us to quickly and easily develop messaging applications. Java EE includes a new Java API for JSON Processing (JSON-P), allowing us to quickly and easily process JSON data. NetBeans includes several features to allow us to quickly and easily develop both RESTful and SOAP-based web services.

This book will guide you through all the NetBeans features that make the development of enterprise Java EE 7 applications a breeze.

What this book covers

Chapter 1, Getting Started with NetBeans, provides an introduction to NetBeans, giving time-saving tips and tricks that will result in more efficient development of Java applications.

Chapter 2, Developing Web Applications Using JavaServer Faces 2.2, explains how NetBeans can help us easily develop web applications that take advantage of the JavaServer Faces 2.2 framework.

Chapter 3, JSF Component Libraries, covers how NetBeans can help us easily develop JSF applications using popular component libraries such as PrimeFaces, RichFaces, and ICEfaces.

Chapter 4, Interacting with Databases through the Java Persistence API, explains how NetBeans allows us to easily develop applications taking advantage of the Java Persistence API (JPA), including how to automatically generate JPA entities from existing schemas. This chapter also covers how complete web-based applications can be generated with a few clicks from an existing database schema.

Chapter 5, Implementing the Business Tier with Session Beans, discusses how NetBeans simplifies EJB 3.1 session bean development.

Chapter 6, Contexts and Dependency Injection, discusses how the CDI API introduced in Java EE 6 can help us integrate the different layers of our application.

Chapter 7, Messaging with JMS and Message-driven Beans, explains Java EE messaging technologies such as the Java Message Service (JMS) and Message-driven Beans (MDB), covering NetBeans' features that simplify application development taking advantage of these APIs.

Chapter 8, Java API for JSON Processing, explains how to process JSON data using the new JSON-P Java EE API.

Chapter 9, Java API for WebSocket, explains how to use the new Java API for WebSocket to develop web-based applications featuring full duplex communication between the browser and the server.

Chapter 10, RESTful Web Services with JAX-RS, covers RESTful web services with the Java API for RESTful Web Services, including coverage of how NetBeans can automatically generate RESTful web services and both Java and JavaScript RESTful web service clients.

Chapter 11, SOAP Web Services with JAX-WS, explains how NetBeans can help us easily develop SOAP web services based on the Java API for the XML Web Services (JAX-WS) API.

What you need for this book

You need Java Development Kit (JDK) version 7.0 or newer and NetBeans 8.0 or newer Java EE edition.

Who this book is for

If you are a Java developer who wishes to develop Java EE applications while taking advantage of NetBeans' functionality to automate repetitive tasks and ease your software development efforts, this is the book for you. Familiarity with NetBeans or Java EE is not assumed.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "NetBeans uses the JAVA_HOME environment variable to populate the JDK's directory location."

A block of code is set as follows:

<package com.ensode.flowscope.namedbeans;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.faces.flow.FlowScoped;
import javax.inject.Named;

@Named
@FlowScoped("registration")
public class RegistrationBean {
...

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

package com.ensode.flowscope.namedbeans;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.faces.flow.FlowScoped;
import javax.inject.Named;

@Named
@FlowScoped("registration")
public class RegistrationBean {
...

Any command-line input or output is written as follows:

chmod +x filename.sh

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: " To download NetBeans, we need to click on the Download button."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.