0%

Book Description

An enterprise Java developer's guide to learning JAX-RS, context and dependency injection, JavaServer Faces (JSF), and microservices with Eclipse MicroProfile using the latest features of Jakarta EE

Key Features

  • Explore Jakarta EE's latest features and API specifications and discover their benefits
  • Build and deploy microservices using Jakarta EE 8 and Eclipse MicroProfile
  • Build robust RESTful web services for various enterprise scenarios using the JAX-RS, JSON-P, and JSON-B APIs

Book Description

Jakarta EE is widely used around the world for developing enterprise applications for a variety of domains. With this book, Java professionals will be able to enhance their skills to deliver powerful enterprise solutions using practical recipes.

This second edition of the Jakarta EE Cookbook takes you through the improvements introduced in its latest version and helps you get hands-on with its significant APIs and features used for server-side development. You'll use Jakarta EE for creating RESTful web services and web applications with the JAX-RS, JSON-P, and JSON-B APIs and learn how you can improve the security of your enterprise solutions. Not only will you learn how to use the most important servers on the market, but you'll also learn to make the best of what they have to offer for your project. From an architectural point of view, this Jakarta book covers microservices, cloud computing, and containers. It allows you to explore all the tools for building reactive applications using Jakarta EE and core Java features such as lambdas. Finally, you'll discover how professionals can improve their projects by engaging with and contributing to the community.

By the end of this book, you'll have become proficient in developing and deploying enterprise applications using Jakarta EE.

What you will learn

  • Work with Jakarta EE's most commonly used APIs and features for server-side development
  • Enable fast and secure communication in web applications with the help of HTTP2
  • Build enterprise applications with reusable components
  • Break down monoliths into microservices using Jakarta EE and Eclipse MicroProfile
  • Improve your enterprise applications with multithreading and concurrency
  • Run applications in the cloud with the help of containers
  • Get to grips with continuous delivery and deployment for shipping your applications effectively

Who this book is for

This book is for Java EE developers who want to build enterprise applications or update their legacy apps with Jakarta EE's latest features and specifications. Some experience of working with Java EE and knowledge of web and cloud computing will assist with understanding the concepts covered in this book.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Jakarta EE Cookbook Second Edition
  3. Dedication
  4. About Packt
    1. Why subscribe?
  5. Foreword
  6. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  7. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Jakarta EE 9 is on the way – what now?
      2. Download the example code files
      3. Download the color images
      4. Conventions used
    4. Sections
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more…
      5. See also
    5. Get in touch
      1. Reviews
  8. New Features and Improvements
    1. Running your first Jakarta Bean Validation 2.0 code
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    2. Running your first Jakarta CDI 2.0 code
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Running your first JAX-RS 2.1 code
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    4. Running your first JSF 2.3 code 
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Running your first JSON-P 1.1 code 
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    6. Running your first JSON-B 1.0 code 
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    7. Running your first Jakarta Servlet 4.0 code 
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Running your first Jakarta Security code 
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Running your first MVC 1.0 code 
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
  9. Server-Side Development
    1. Using Jakarta CDI to inject context and dependencies
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    2. Using Jakarta Bean Validation for data validation
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Using Jakarta Servlet for request and response management
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Using Server Push to make objects available beforehand
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Using EJB and JTA for transaction management
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Using EJB to deal with concurrency
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Using JPA for smart data persistence
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    8. Using EJB and JPA for data caching
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Using Jakarta Batch processing
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
  10. Building Powerful Services with JSON and RESTful Features
    1. Building server-side events with JAX-RS
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    2. Improving service's capabilities with JAX-RS and Jakarta CDI
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Easing data and objects representation with Jakarta JSON Binding
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    4. Parsing, generating, transforming, and querying JSON objects using Jakarta JSON Processing
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
  11. Web and Client-Server Communication
    1. Using servlets for request and response management
      1. Getting ready
      2. How to do it...
      3. How it works...
        1. The load-on-startup servlet
        2. A servlet with initParams
        3. The asynchronous servlet
      4. See also
    2. Building a UI with template features using JSF
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Improving response performance with Server Push
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  12. Security of the Enterprise Architecture
    1. Domain protection with authentication
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    2. Granting rights through authorization
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Protecting data confidentiality and integrity with SSL/TLS
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Using declarative security
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    5. Using programmatic security
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
  13. Reducing Coding Effort by Relying on Standards
    1. Preparing your application to use a connection pool
      1. Getting ready
      2. How to do it...
      3. There's more...
      4. See also
    2. Using messaging services for asynchronous communication
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Understanding a servlet's life cycle
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    4. Transaction management
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
  14. Deploying and Managing Applications on Major Jakarta EE Servers
    1. Understanding Apache TomEE
      1. Getting ready
      2. How to do it...
      3. There's more...
      4. See also
    2. Eclipse GlassFish
      1. Getting ready
      2. How to do it...
      3. There's more...
      4. See also
    3. Red Hat WildFly
      1. Getting ready
      2. How to do it...
      3. There's more...
      4. See also
  15. Building Lightweight Solutions Using Microservices
    1. Building microservices from a monolith
      1. Getting ready
      2. How to do it...
        1. Building a monolith
        2. Building microservices from the monolith
      3. How it works...
      4. There's more...
      5. See also
    2. Building decoupled services
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Building an automated pipeline for microservices
      1. Getting ready
      2. How to do it...
        1. Continuous integration
        2. Continuous delivery
        3. Continuous deployment
      3. There's more...
      4. See also
    4. Determining the state of a microservice by using the MicroProfile Health Check API
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Generating and/or monitoring metrics with the MicroProfile Metrics API
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Exposing API documentation using the MicroProfile OpenAPI
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  16. Using Multithreading on Enterprise Context
    1. Building asynchronous tasks with returning results
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    2. Using transactions with asynchronous tasks
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Checking the status of asynchronous tasks
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    4. Building managed threads with returning results
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    5. Scheduling asynchronous tasks with returning results
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    6. Using injected proxies for asynchronous tasks
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
  17. Using Event-Driven Programming to Build Reactive Applications
    1. Building reactive applications using asynchronous servlets
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    2. Building reactive applications using events and observers
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Building reactive applications using WebSocket
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    4. Building reactive applications using message-driven beans
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    5. Building reactive applications using Jakarta RESTful Web Services
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    6. Building reactive applications using asynchronous session beans
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    7. Using lambdas and CompletableFuture to improve reactive applications
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
  18. Rising to the Cloud - Jakarta EE, Containers, and Cloud Computing
    1. Building Jakarta EE containers using Docker
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    2. Using Oracle Cloud Infrastructure for container orchestration in the cloud
      1. Getting ready
      2. How to do it...
    3. Using Jelastic for container orchestration in the cloud
      1. Getting ready
      2. How to do it...
    4. Using OpenShift for container orchestration in the cloud
      1. Getting ready
      2. How to do it...
    5. Using AWS for container orchestration in the cloud
      1. Getting ready
      2. How to do it...
  19. Appendix - The Power of Sharing Knowledge
    1. Introduction
    2. Why contributing to the Adopt a JSR program can make you a better professional
      1. Understanding the Adopt a JSR program
      2. Collaborating on the future of Jakarta EE
      3. Setting yourself up for collaboration
        1. Setting aside a specific time for it
        2. Choosing where you'll concentrate your efforts
        3. Do it!
    3. The secret to unsticking your career, your project, and even your life!
  20. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
3.144.96.159