Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Java: Enterprise App Development with Java EE 8: 2-in-1
Rating: 4.3 out of 5(106 ratings)
863 students

Java: Enterprise App Development with Java EE 8: 2-in-1

Get hands-on with Java EE to build modern RESTful web services and enterprise applications with the latest Java EE 8 API
Last updated 5/2018
English

What you'll learn

  • Comprehensive, example-oriented guide covering APIs and why approaches are necessary in modern Java EE 8
  • Demonstrates how to implement application business logic with minimal boilerplate code
  • Design modern, stylish web services with Java EE APIs
  • Focus on the latest Java EE 8 APIs and secure your web services with JSON Web token
  • Gain advanced knowledge of RESTful web services and the JAX-RS API provided by the Java EE

Course content

2 sections60 lectures5h 15m total length
  • The Course Overview3:52

    This video will give you an overview about the course.

  • Implementing domain business logic in Java EE8:59

    The video shows how to implement business domain logic in Java EE and plain Java. It covers how Java EE encourages business-oriented solutions. Basic Java EE APIs is introduced.

    • Define business domain classes, their properties and relations in plain Java
    • Define a business boundary which implements the use cases
    • Delegate complex business logic to injected beans 
  • EJBs and CDI managed beans6:34

    The video shows the differences between the EJB and CDI APIs. It covers when to use which and what needs to be done in order to setup the managed beans.

    • Comprehend the main differences between EJBs and CDI managed beans
    • Comprehend the similarities in the usage of EJBs and CDI managed beans
    • Setup a basic beans.xml to configure CDI for injection of all beans 
  • CDI producers2:55

    The video shows CDI producers, their power and how to define and use them.

    • Inject a component that is not a managed bean or that needs more flexibility
    • Define CDI producer methods or producer fields
    • Comprehend the similarity in using and injecting beans and produced values 
  • Qualifiers3:31

    The video shows the necessity of and how to define and use CDI qualifiers. It covers how to define custom qualifier annotations.

    • Identify that an injected value cannot be identified unambiguously
    • Bind CDI producers to injection points using qualifiers
    • Define custom qualifier annotations that allow type-safety 
  • Scopes4:59

    The video explains the different scopes or managed beans. It covers both EJB and CDI, their differences and similarities.

    • Comprehend the EJB stateless, stateful and singleton scope
    • Injecting CDI managed beans without scope definitions results in the dependent scope
    • Define CDI scopes on the bean or producer definitions to modify the bean’s scope and life cycle 
  • Events4:45

    The video explains how to model and implement domain events using CDI. CDI comes with a powerful eventing mechanism which allows to decouple event creation from event handling.

    • Define business-motivated domain events as plain Java classes
    • Inject and fire the event during the business process execution using CDI
    • Define an event handling mechanism that processes the fired events 
  • JAX-RS resources7:05

    This video shows how to define JAX-RS resources that make an Java EE application accessible via HTTP. It covers how JAX-RS applications are bootstrapped and how Java types are translated into HTTP payloads.

    • Set up the JAX-RS application by configuring the base application path
    • Define a JAX-RS resources, a facade to the business boundary using the JAX-RS annotations
    • Produce and accept the HTTP payloads in the desired content types. JAX-RS will automatically marshal the Java types 
  • Integrating JSON-B2:02

    This video shows how to declaratively marshal Java types to JSON definitions and back. It covers how JAX-RS integrates with JSON-B definitions out of the box.

    • Customize the default Java type to/from JSON mapping via JSON-B annotations
    • Use JSON-B to marshal Java types by defining JAX-RS resources to produce or accept JSON
    • Declaratively enhance or change the Java type definitions if required 
  • Integrating JSON-P4:37

    This video shows how to programmatically marshal Java types to JSON definitions and back using JSON-P. It covers how JAX-RS integrates with JSON-P.

    • Identify JSON mappings that are not sufficiently covered by JSON-B
    • Define JSON structure creation programmatically using the JSON-P builder API
    • Integrate JSON-P types with JAX-RS resources for both request and response bodies. 
  • Custom HTTP responses6:11

    This video shows how to send custom HTTP responses with JAX-RS. Examples for custom responses are HTTP status codes or header fields.

    • Use the Response type from JAX-RS to build custom HTTP responses.
    • Send different status codes if the default statuses don’t match your requirements
    • Use the UriInfo context object to build URIs that point to your resources 
  • Validating communication5:19

    This video shows how to validate HTTP messages using Bean Validation and JAX-RS. It covers how to define custom validation constraints that match the application business logic.

    • Use the @Valid annotation to instruct JAX-RS to validate Java objects
    • Define Bean Validation annotations on the Java types that need to be validated
    • Define custom validation constraint annotations to implement custom validation logic 
  • Exception handling5:25

    This video shows how to handle exception that occur within our application in JAX-RS.

    • Implement the ExceptionMapper type with the custom exception mapping logic
    • Define the ExceptionMapper for a specific exception and activate it via @Provider
    • Define a ConstraintViolationExceptionMapper to map a failed validation to a custom HTTP response 
  • Mapping domain entities with JPA6:05

    This video shows how JPA is used to map domain entities to the database. It covers how to bootstrap JPA for enterprise applications and how to declaratively define persistence mappings.

    • Define a persistence.xml mapping file and a one or more persistence units for your application
    • Map domain entities using JPA annotations such as @Entity
    • Use the EntityManager type to persist and acquire persisted entities 
  • Entity relations7:04

    This video shows how to define entity relations that are part of the business domain. It covers which JPA definitions are required to specify the relation mapping in the database tables.

    • Define the relation to enum values using @Enumerated
    • Define the relation to other entities using @OneToOne, @OneToMany, @ManyToOne and @ManyToMany
    • Define join columns and their properties via the annotation properties 
  • Datasources2:42

    This video shows how to define and use application server datasources. The datasources are used to access relational databases.

    • Use the default datasource of the application server if only one database is required
    • Define persistence units with datasource JDNI names for multiple databases
    • Specify the datasource properties in the application server configuration 
  • Transactions5:07

    This video shows how to use technical transaction that handle database queries. It covers how exceptions that occur during the active transaction are handled.

    • Use the default EJB mechanism that starts technical transactions for business methods
    • Use the transaction type definition to control the logical flow of transactions
    • Define rollback behaviors for specific exception types 
  • Interceptors3:16

    This video shows how to define and bind interceptors. Interceptors are used to interrupt the execution of methods and inject custom logic.

    • Define an Interceptor class and bind it to a business method using @Interceptors
    • Implement the custom interception logic in the interceptor method
    • Inject and use managed beans in the interceptor class 
  • Binding custom interceptors5:48

    This video shows how custom interceptors are bound and activated via custom interceptor binding annotations. This approach minimizes coupling in our application.

    • Define an interceptor binding annotation with @InterceptorBinding
    • Annotate the interceptor and the business method or bean with the interceptor binding
    • Activate the bound interceptor via beans.xml or a specified priority 
  • Configuring Java EE applications5:40

    This video shows how to configure Java Enterprise application via CDI. It covers how CDI producers fulfill to define custom configuration requirements. The example configuration load the configured values from an application properties file.

    • Identify and inject configured values into managed beans
    • Define CDI producer methods that lookup and expose configuration values
    • Specify custom qualifiers to further qualify the desired configuration values 
  • Caching6:22

    This video shows how and when to use caching. It covers how to build a simple yet effective custom cache and includes an outlook to the JCache API.

    • Identify and evaluate the requirements for caching first
    • Define custom caches via application scoped or singleton beans
    • Use JCache or vendor-specific solutions if custom implementations are not sufficient or become too complex 
  • Logging7:10

    This video shows how and when to include logging in enterprise applications. It covers the shortcomings of traditional logging, which other solutions are reasonable and possible.

    • Identify and evaluate the motivation for logging and look for potential different solutions
    • Identify and simplify log invocations using custom log facades
    • Log errors that can not be recovered from using the custom log facade 
  • Asynchronous EJBs4:28

    This video shows how to define asynchronous EJB methods. It covers the possibilities and implications of asynchronous execution within EJBs.

    • Annotate EJB business methods with @Asynchronous to invoke them asynchronously
    • Define Future return types if a direct result is required
    • Beware of scopes of managed beans in asynchronous methods 
  • Asynchronous CDI events3:15

    This video shows how to define and fire asynchronous CDI events with both asynchronous EJB methods and CDI definitions.

    • Use asynchronous EJB methods to handle CDI events asynchronously
    • Define and fire CDI events using the fireAsync method
    • Observe events that are fired via the fireAsync method with @ObservesAsync 
  • Managed threads3:48

    This video shows what container-managed threads are, what the threading requirements for enterprise applications are and which Java EE functionalities support developers. It covers the required APIs to use container-managed threads.

    • Acquire and use the ManagedExecutorService to execute functionality within its own thread
    • Avoid using application-managed threads or functionality that starts own threads, such as parallel streams
    • Use CompletableFutures with the acquired ManagedExecutorService to implement more complex functionality 
  • Timers4:35

    This video shows how to define application timers via EJBs and CDI managed beans. It covers which APIs to use to define timers and scheduled jobs.

    • Use the @Schedule annotation to define cron-like method invocations
    • Beware of bean scopes when defining application timers
    • Acquire and use the ManagedScheduledExecutorService to define scheduled jobs on CDI managed beans 
  • Asynchronous JAX-RS resources7:03

    This video shows the motivations behind asynchronous JAX-RS resources and how to make use of them. It covers common use cases for this functionality.

    • Define a @Suspended AsyncResponse to suspend the HTTP request thread
    • Acquire and use the ManagedExecutorService to execute the business logic
    • Alternatively, use asynchronous EJB methods or define JAX-RS resources with a CompletionStage return type 
  • Accessing HTTP using JAX-RS8:46

    This video shows how to access HTTP resources using the JAX-RS client. It covers how web targets are defined and used to send requests and read responses from and to Java types, respectively.

    • Create an instance of the JAX-RS client using the ClientBuilder functionality
    • Define a WebTarget that accesses the HTTP resources
    • Use the invocation builder functionality to invoke targets and read responses 
  • Extended client usage4:33

    This video shows how to use the JAX-RS client to retrieve collection resources and automatically map them to corresponding Java collection types. It also covers path templates.

    • Use the JSON-P JsonArray type to conveniently map JSON collection responses
    • Use JAX-RS’es GenericType to retrieve Java collection response types
    • Use the path template functionality of WebTargets to define and resolve path variables 
  • Making HTTP clients resilient5:10

    This video shows how to handle client exceptions and potential errors. It also covers how to make client invocations more resilient by defining different type of timeouts.

    • Beware of potential runtime exceptions that can occur on client invocations
    • Potentially use Interceptors to catch client exceptions
    • Define connection and read timeouts to make HTTP invocations resilient 
  • Asynchronous, reactive clients7:26

    This video shows how to use the asynchronous and reactive JAX-RS client functionality. It covers how to use the CompletableFuture type in client invocations and the rx invocation builder.

    • Use CompletableFutures to manually wrap client invocations into separate execution paths
    • Use JAX-RS’es rx invocation builder to conveniently receive a CompletionStage return type
    • Combine the CompletionStage or CompletableFuture types to compute the desired results 
  • Implementing SSE resources with JAX-RS8:26

    This video shows how to use the JAX-RS API to define and implement Server-Sent Events (SSE) resources. It covers the required JAX-RS types and APIs.

    • Define SSE JAX-RS resource methods using the SSE Java types
    • Use the Sse, SseBroadcaster and SseEventSink types to send SSE messages to connected clients
    • Manually resend events using the last event ID, if required 
  • Server-sent event clients3:58

    This video shows how to consume Server-Sent Events (SSE) resources both on the command line and by using the JAX-RS SSE client. It also cover the last event ID HTTP header that controls which data is being resent.

    • Use the SseEventSource type to access SSE resources from web targets
    • Register an event consumer that will be invoked on arriving events
    • Open the connection to the created SseEventSource 
  • Implementing WebSocket server endpoints6:45

    This video shows how to use the Java EE’s WebSocket API to define server endpoints. It also covers how to define MessageDecoders and Encoders.

    • Define a ServerEndpoint that will be invoked for WebSocket connections
    • Define corresponding MessageDecoders and Encoders for the message Java types
    • Use the bidirectional remote object to respond to messages 
  • Accessing WebSocket endpoints5:41

    This video shows how to access WebSocket endpoints by the WebSocket API. It also covers how client connections are bootstrapped.

    • Define a ClientEndpoint that will be invoked for WebSocket connections
    • Define corresponding MessageDecoders and Encoders for the message Java types
    • Programmatically create a client to initialize the WebSocket connection 
  • Test your knowledge

Requirements

  • Programming experience of Java is required.

Description

The Java Enterprise Edition is one of the leading application programming platforms for enterprise Java development. With Java EE 8, it is easier to develop modern and lightweight web services with the latest API additions and improvements.

This comprehensive 2-in-1 course is comprehensive, example-oriented guide covering APIs and why approaches are necessary in modern Java EE 8.Demonstrates how to implement application business logic with minimal boilerplate code. You’ll design modern, stylish web services with Java EE APIs. You’ll focus on the latest Java EE 8 APIs and secure your web services with JSON Web token.

Contents and Overview

This training program includes 2 complete courses, carefully chosen to give you the most comprehensive training possible.

The first course, Learning Java EE 8, covers full-fledged application development with the latest API'sThis course will teach you important core JAVA EE components. You’ll also learn about the asynchronous communication protocol. You’ll also develop a car management enterprise application. It also answers questions related to how Java EE compares to the Java language, should developers transition to it, and what types of application would benefit from it.

The second course, Building Web Services with Java EE 8, covers creation of modern RESTful web services with the Java EE 8 API.This course will teach you how to develop state-of-the-art RESTful web services with the latest Java EE 8 APIs. You’ll implement, build, and package you're first working web service as a prototype. You’ll also explore advanced web service topics such as validation, JWT security, and diagnosability.

By the end of this course, you’ll have a thorough understanding of the Java EE 8 APIs required for modern RESTful and lightweight web service development as well as full-fledgedenterprise applications.

About the Authors

  • Sebastian Daschneris a Java freelancer working as a consultant, author, and trainer and is enthusiastic about programming and Java (EE). He is the author of the book Architecting Modern Java EE Applications. Sebastian participates in the JCP, helping to form the future standards of Java EE; serving in the JAX-RS, JSON-P, and Config Expert Groups; and collaborating on various open source projects. For his contributions to the Java community and ecosystem, he was recognized as a Java Champion, Oracle Developer Champion, and double 2016 JavaOneRockstar. Sebastian is a regular speaker at international IT conferences such as JavaLand, JavaOne, or Jfokus. Together with Java Community Manager Steve Chin, he has visited dozens of conferences and Java User Groups by motorbike. Steve and Sebastian have launched JOnsen, a Java conference held at a hot spring in the countryside of Japan. Sebastian has been working with Java for more than 8 years. Besides Java, Sebastian is also a heavy user of Linux and container technologies. He evangelizes computer science practices on his newsletter, and on Twitter via @DaschnerS. When not working with Java, he also loves to travel the world, either by plane or motorbike.
  • Mario-Leander Reimer is a chief technologist for QAware GmbH. He is a senior Java developer with several years of experience in designing complex and large-scale system architectures. He continuously looks for innovations and ways to combine and apply state-of-the-art technology and open source software components in real-world customer projects. He studied computer science at Rosenheim and Staffordshire University and he is teaching cloud computing as a part-time lecturer.

Who this course is for:

  • Software developers familiar with Java who are now keen to explore the Java EE platform to understand how to build enterprise-level applications.
  • Java developers who want to learn how to implement web services using the latest Java EE 8 APIs.