Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Java EE 8 Application Development
Java EE 8 Application Development

Java EE 8 Application Development: Develop Enterprise applications using the latest versions of CDI, JAX-RS, JSON-B, JPA, Security, and more

eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Java EE 8 Application Development

Introduction to Java EE

The Java Platform, Enterprise Edition (Java EE) consists of a set of Application Programming Interface (API) specifications used to develop server-side, enterprise Java applications. In this chapter, we will provide a high-level overview of Java EE.

We will cover the following topics in this chapter:

  • Introduction to Java EE
  • One standard, multiple implementations
  • Java EE, J2EE, and the Spring Framework

Introduction to Java EE

The Java Platform, Enterprise Edition (Java EE) is a collection of API specifications designed to work together when developing server-side, enterprise Java applications. Java EE is a standard; there are multiple implementations of the Java EE specifications. This fact prevents vendor lock-in since code developed against the Java EE specification can be deployed to any Java EE-compliant application server with minimal or no modifications.

Java EE is developed under the Java Community Process (JCP), an organization responsible for the development of Java technology. JCP members include Oracle (the current steward of the Java platform), and the Java community at large.

Java community process

The Java Community Process (JCP) allows interested parties to assist in developing standard technical specification for Java technology. Both companies and individuals can become members of the JCP and contribute to any technical specification they may be interested in. Each Java EE API specification is developed as part of a Java Specification Request (JSR). Each JSR is assigned a unique number. JavaServer Faces (JSF) 2.3 is developed as JSR 372, for instance.

Since Java EE is developed under the JCP, no one company has complete control over the Java EE specification, since, as mentioned before, the JCP is available to the Java community at large, both software vendors and interested individuals.

Different JCP members have different interests, and contribute to different Java EE specifications; the end result is that Java EE is jointly developed by various members of the Java community.

Java EE APIs

As previously mentioned, Java EE is a collection of API specifications designed to work together when developing server-side enterprise Java applications. Java EE 8 APIs include:

  • JavaServer Faces (JSF) 2.3
  • Java Persistence API (JPA) 2.2
  • Enterprise JavaBeans (EJB) 3.2
  • Contexts and Dependency Injection for the Java EE Platform (CDI) 2.0
  • Java API for JSON Processing (JSON-P) 1.1
  • Java API for JSON Binding (JSON-B) 1.0
  • Java API for WebSocket 1.0
  • Java Message Service (JMS) 2.0
  • Java EE Security API 1.0
  • Java API for RESTful Web Services (JAX-RS) 2.1
  • Java API for XML Web Services (JAX-WS) 2.2
  • Servlet 4.0
  • Expression Language (EL) 3.0
  • JavaServer Pages (JSP) 2.3
  • Java Naming and Directory Interface (JNDI) 1.2
  • Java Transaction API (JTA) 1.2
  • Java Transaction Service (JTS) 1.0
  • JavaMail 1.5
  • Java EE Connector Architecture (JCA) 1.7
  • Java Architecture for XML Binding (JAXB) 2.2
  • Java Management Extensions (JMX) 1.2
  • Standard Tag Library for JavaServer Pages (JSTL) 1.2
  • Bean Validation 2.0
  • Managed Beans 1.0
  • Interceptors 1.2
  • Concurrency Utilities for Java EE 1.0
  • Batch Applications for the Java Platform 1.0

The preceding list is a list of specifications, application server vendors or the open source community need to provide implementations for each Java EE API specification. Application server vendors then bundle a set of Java EE API implementations together as part of their application server offerings. Since each implementation is compliant with the corresponding Java EE JSR, code developed against one implementation can run unmodified against any other implementation, avoiding vendor lock-in.

Due to time and space constraints, we won't cover every single Java EE API specification in this book, instead focusing on the most popular Java EE APIs. The following table summarizes the APIs that we will be covering:

Java EE API

Description

JavaServer Faces (JSF) 2.3

JSF is a component library that greatly simplifies the development of web applications.

Java Persistence API (JPA) 2.2

JPA is the Java EE standard Object-Relational Mapping (ORM) API. It makes it easy to interact with relational databases.

Enterprise JavaBeans (EJB) 3.2

EJB's allow us to easily add enterprise features such as transactions and scalability to our Java EE applications.

Contexts and Dependency Injection (CDI) 2.0

CDI allows us to easily define the life cycle of Java objects and provides the ability to easily inject dependencies into Java objects; it also provides a powerful event mechanism.

Java API for JSON Processing (JSON-P) 1.1

JSON-P is an API that allows working with JSON strings in Java.

Java API for JSON Binding (JSON-B) 1.0

JSON-B provides the ability to easily populate Java objects from JSON streams and back.

Java API for WebSocket 1.0

WebSocket is a standard Java EE implementation of the Internet Engineering Task Force (IETF) WebSocket protocol, which allows full duplex communication over a single TCP connection.

Java Message Service (JMS) 2.0

JMS is a standard API that allows Java EE developers to interact with Message Oriented Middleware (MOM).

Java EE Security API 1.0

The Java EE Security API aims to standardize and simplify the task of securing Java EE applications.

Java API for RESTful Web Services (JAX-RS) 2.1

JAX-RS is an API for creating RESTful web services endpoints and clients.

Java API for XML Web Services (JAX-WS) 2.2

JAX-WS is an API that allows the creation of Simple Object Access Protocol (SOAP) web services.

Servlet 4.0

The servlet API is a low-level API used to implement server-side logic in web applications.

 

We will also cover how to develop microservices by leveraging standard Java EE APIs. Microservices are a modern, popular architectural style in which applications are split up into small modules deployed independently, interacting with each other via the network, typically by leveraging RESTful web services.

We should also note that, with the possible exception of the chapter on microservices, each chapter on this book is standalone; feel free to read the chapters in any order.

Now that we have covered the different APIs provided by Java EE, it is worth reiterating that Java EE is a single standard with multiple implementations, some commercial, and some open source.

One standard, multiple implementations

At its core, Java EE is a specification—a piece of paper, if you will. Implementations of Java EE specifications need to be developed so that application developers can actually develop server-side, enterprise Java applications against the Java EE standard. Each Java EE API has multiple implementations; the popular Hibernate Object-Relational Mapping tool, for example, is an implementation of Java EE's Java Persistence API (JPA). However, it is by no means the only JPA implementation; other JPA implementations include EclipseLink and OpenJPA. Similarly, there are multiple implementations of every single Java EE API specification.

Java EE applications are typically deployed to an application server; some popular application servers include JBoss, Websphere, Weblogic, and GlassFish. Each application server is considered to be a Java EE implementation. Application server vendors either develop their own implementation of the several Java EE API specifications or choose to include an existing implementation.

Application developers benefit from the Java EE standard by not being tied to a specific Java EE implementation. As long as an application is developed against standard Java EE APIs, it should be very portable across application server vendors.

Java EE, J2EE, and the Spring framework

Java EE was introduced back in 2006; the first version of Java EE was Java EE 5. Java EE replaced J2EE; the last version of J2EE was J2EE 1.4, released back in 2003. Even though J2EE can be considered a dead technology, replaced by Java EE over 11 years ago, the term J2EE refuses to die. Many individuals to this day still refer to Java EE as J2EE; many companies advertise on their websites and job boards that they are looking for "J2EE developers", seemingly unaware that they are referring to a technology that has been dead for several years. The correct term is and has been for a long time, Java EE.

Additionally, the term J2EE has become a "catch-all" term for any server-side Java technology; frequently Spring applications are referred to as J2EE applications. Spring is not, and has never been, J2EE; as a matter of fact, Spring was created by Rod Johnson as an alternative to J2EE back in 2002. Just like with Java EE, Spring applications are frequently erroneously referred to as J2EE applications.

Summary

In this chapter, we provided an introduction to Java EE, supplying a list of several technologies and application programming interfaces (APIs) included with Java EE.

We also covered how Java EE is developed both by software vendors and the Java community at large via the Java community process.

Additionally, we explained how there are multiple implementations of the Java EE standard, a fact that avoids vendor lock-in and allow us to easily migrate our Java EE code from one application server to another.

Finally, we cleared up the confusion between Java EE, J2EE, and Spring, explaining how Java EE and Spring applications are frequently referred to as J2EE applications, even though J2EE has been a dead technology for several years.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Covers all of the major Java EE 8 APIs and includes new additions such as enhanced Security, JSON-B Processing, and more
  • Learn additional Java EE APIs, such as the Java API for Websocket and the Java Message Service (JMS)
  • Develop applications by taking advantage of the latest versions of CDI, Security, Servlets, and JSF and other Java EE specifications

Description

Java EE is an Enterprise Java standard. Applications written to comply with the Java EE specification do not tie developers to a specific vendor; instead they can be deployed to any Java EE compliant application server. With this book, you’ll get all the tools and techniques you need to build robust and scalable applications in Java EE 8. This book covers all the major Java EE 8 APIs including JSF 2.3, Enterprise JavaBeans (EJB) 3.2, Contexts and Dependency Injection (CDI) 2.0, the Java API for WebSockets, JAX-RS 2.1, Servlet 4.0, and more. The book begins by introducing you to Java EE 8 application development and goes on to cover all the major Java EE 8 APIs. It goes beyond the basics to develop Java EE applications that can be deployed to any Java EE 8 compliant application server. It also introduces advanced topics such as JSON-P and JSON-B, the Java APIs for JSON processing, and the Java API for JSON binding. These topics dive deep, explaining how the two APIs (the Model API and the Streaming API) are used to process JSON data. Moving on, we cover additional Java EE APIs, such as the Java API for Websocket and the Java Message Service (JMS), which allows loosely coupled, asynchronous communication. Further on, you’ll discover ways to secure Java EE applications by taking advantage of the new Java EE Security API. Finally, you’ll learn more about the RESTful web service development using the latest JAX-RS 2.1 specification. You’ll also get to know techniques to develop cloud-ready microservices in Java EE.

Who is this book for?

If you are a Java developer who wants to become proficient with Java EE 8, this book is ideal for you. You are expected to have some experience with Java and to have developed and deployed applications in the past, but you don't need any previous knowledge of Java EE.

What you will learn

  • Develop and deploy Java EE applications
  • Embrace the latest additions to the Contexts and Dependency Injection (CDI) specification to develop Java EE applications
  • Develop web-based applications by utilizing the latest version of JavaServer Faces, JSF 2.3.
  • Understand the steps needed to process JSON data with JSON-P and the new JSON-B Java EE API
  • Implement RESTful web services using the new JAX-RS 2.1 API, which also includes support for Server-Sent Events (SSE) and the new reactive client API
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 12, 2017
Length: 372 pages
Edition : 1st
Language : English
ISBN-13 : 9781788293679
Vendor :
Oracle
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Publication date : Dec 12, 2017
Length: 372 pages
Edition : 1st
Language : English
ISBN-13 : 9781788293679
Vendor :
Oracle
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 120.97
Java EE 8 Application Development
€41.99
Architecting Modern Java EE Applications
€41.99
Java EE 8 and Angular
€36.99
Total 120.97 Stars icon

Table of Contents

14 Chapters
Introduction to Java EE Chevron down icon Chevron up icon
JavaServer Faces Chevron down icon Chevron up icon
Object Relational Mapping with the Java Persistence API Chevron down icon Chevron up icon
Enterprise JavaBeans Chevron down icon Chevron up icon
Contexts and Dependency Injection Chevron down icon Chevron up icon
JSON Processing with JSON-P and JSON-B Chevron down icon Chevron up icon
WebSocket Chevron down icon Chevron up icon
Java Messaging Service Chevron down icon Chevron up icon
Securing Java EE Applications Chevron down icon Chevron up icon
RESTful Web Services with JAX-RS Chevron down icon Chevron up icon
Microservices Development with Java EE Chevron down icon Chevron up icon
Web Services with JAX-WS Chevron down icon Chevron up icon
Servlet Development and Deployment Chevron down icon Chevron up icon
Configuring and Deploying to GlassFish Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(9 Ratings)
5 star 55.6%
4 star 11.1%
3 star 22.2%
2 star 11.1%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Paulo Diaz Dec 01, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excelente libro de Aplicaciones basadas en Java para EE
Amazon Verified review Amazon
eva Feb 18, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Es un libro muy completo de Java ee 8. Contiene toda la información que se puede necesitar. Un acierto comprarlo
Amazon Verified review Amazon
Texashowdy Apr 21, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good summary of the Java EE landscape. The book is a good resource for experienced architects. Examples are focussed and small
Amazon Verified review Amazon
brosnan Jul 06, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Por lo menos lo recibí, demoro un poco pero estoy feliz por ahora tener mi artículo que pedí.
Amazon Verified review Amazon
Elder Moraes Mar 14, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As usual, David did again a great job on this book. It shows a lot of working code exploring deep details of Java EE 8 API's and also giving plenty concepts that will help you understand its basis.If you are a Java EE developer or want to become one, this book is surely a must.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela