
Begin the Jakarta EE deep dive with a warm welcome and a clear course overview. Outline objectives and the todo app project to set expectations for hands-on learning.
Explore building a Jakarta EE to-do app and deploying it to the cloud with containers. Create users, login, and manage authentication tokens as you test and expose the application.
Create a Jakarta EE todo app project from scratch using an ide-agnostic workflow and a command line tool; switch among IntelliJ, Eclipse, or NetBeans while bootstrapping and adding dependencies.
Walks through building a Jakarta EE hello world app with maven, including dependency management, Payara as runtime, JUnit testing, and running the app from the command line.
Explore how a Jakarta EE hello world app deploys on a server, exposes REST resources, and uses OpenAPI and Swagger to provide a machine-readable interface.
Explore the three canonical Jakarta EE APIs—JPA for persistence, CDI for dependency injection, and JAX-RS for REST—to build a portable, data-driven todo app.
Create the TodoUser entity and define its primary key using JPA annotations, mapping the class to a database table and ensuring a unique id field.
Create a todo user entity mapped to a relational database, with an auto-generated primary key and fields for email, password, and name, using a JPA provider's generated value strategy.
Customize the TodoUser entity by mapping it to a specific database table and columns using @Table and @Column, adjusting primary key, email length, and password handling to fit client requirements.
Create a todo entity in Jakarta EE, address duplicated primary key fields across many entities using JPA inheritance and a shared abstraction to avoid repeating code.
Explore how to use inheritance to share recurring fields by creating an abstract entity or mapped superclass, letting sub-entities inherit a common primary key and fields.
Populate the todo entity with created date, due date, completed and archived flags, reminder, and owner, and distinguish basic fields from entity relationships when mapping to database with JPA annotations.
Explore one-to-many and many-to-one relationships in a Jakarta EE todo app using annotations. Learn how these mappings create foreign keys in the todo table referencing users and support unidirectional relationships.
Explore bidirectional entity relationships in Jakarta EE by mapping one-to-many and many-to-one associations, using primary keys and foreign keys, with focus on inside versus outside relationship handling and queries.
Learn how to customize a foreign key column in a database table with the @JoinColumn annotation, including user_id in a to-do table and many-to-one relationships.
Explore bean validation in Jakarta EE, enforcing constraints on entity fields such as non-null task data, future due dates, valid emails, and password strength rules to prevent invalid persistence.
Learn how to enforce validation on the Todo task field by requiring non-empty values, applying size constraints, and customizing violation messages, with database column length considerations.
Add validation constraints to todo entity. Enforce that the due date is present or in the future, not in the past, using API annotations and year-month-day formats in restful services.
Apply validation constraints to the todo entity, constraining the due date and the completed flag, and explain which fields are essential to the todo's existence versus optional.
Define validation constraints for the TodoUser entity, ensuring email is non-empty and matches a given format, and full name respects minimum and maximum length rules.
Enforce password validation on the todo user entity by applying not empty, length constraints (8-100 characters), and a regex pattern that enforces a set of allowed characters, including special characters.
Advance the domain modeling recap by completing the first phase of data modeling and preparing to implement queries for the todo app's two entities.
Explore how the Java Persistence API enables querying over Java objects using JPQL, criteria queries, and native SQL, and learn when to use each approach.
Define and use named queries on the TodoUser entity with JPQL, distinguishing them from dynamic queries, and substitute runtime parameters like email through a unique persistence unit query.
Learn to query the TodoUser entity with JPQL in a Jakarta EE todo app, including selecting fields, filtering by criteria, and ordering results.
Learn how JPQL queries pass through the entity manager to the persistence provider, enabling database-agnostic data access and automatic SQL translation for todo user data.
Learn to query the TodoUser entity with JPQL to fetch a user's todos by owner email, addressing multi-tenant data isolation in a Jakarta EE to-do app.
Focus on solving small tasks with Jakarta EE by building a simple to-do app, rather than chasing Netflix-scale optimizations. Apply real-world API concepts using the Data Weeks platform.
Explore building the service layer with Jakarta Enterprise Beans (EJBs) to persist and query todo data through named queries and a business facade, using EJBs for scalable, reliable database access.
Explore how to transform a persistence class into a stateless EJB, and set up query and persistence services with clear naming conventions for a todo app.
Explore stateless, stateful, and singleton EJBs and how they handle data. See how stateless do not retain state, how stateful preserve it, and how singleton provides a shared instance.
Explore how a stateless EJB implements the persistence service, connecting to the database via the entity manager and mapping entities to data stores for robust data access.
Learn how the JPA entity manager interface interacts with the persistence context to manage entity identities, lifecycle, and persistence operations within a unified programming model.
Explore how the JPA persistence context groups a set of entities into a single managed collection by an entity manager, enabling cohesive persistence operations.
the lecture defines a persistence context as a collection of entities managed by the entity manager, created from a persistence unit, with all operations executed inside a transaction context.
Inject the EntityManager into a persistence service via dependency injection using a persistence context; the container provides the concrete manager and defaults to a single persistence unit.
Implement the save todo user method by using the entity manager within a transaction context. Persist new entities in the persistence context so changes flush to the database on exit.
Explore how to persist todo user data by handling attached and detached entities within a persistence context, identifying new versus existing records, and using flush to synchronize with the database.
Implement persistence service methods to save a todo by linking it to the currently authenticated user via session data and CDI context.
Implement a session-scoped CDI persistence service for saving todos. Authenticate users, store their email in the session, and use a query service to persist new todo entities.
Implement a named query in a todo app to locate a TodoUser by email using an entity manager, bind the email parameter, and return a single result from the query.
Explore how to use named queries in a stateless EJB with the entity manager, including creating named queries, setting parameters, and retrieving single or multiple results.
Master Jakarta EE EJB query services by implementing methods to list all TodoUsers and find a TodoUser by ID, using named queries for type-safe database results.
Implement a query service EJB method to find a TodoUser by name using a named query with like and wildcards, binding the name parameter, and returning matching results.
Implement query service EJB methods to find all todos and find by name in a stateless bean using parameterized inputs. Test these queries to verify results.
Explore integration testing with arquillian and junit by packaging a test archive, deploying to a managed container, and validating service, persistence, and entity interactions.
Explore testing services with Arquillian and JUnit by running tests against an embedded container, interpreting failures, and validating the query service and persistent service.
Test Jakarta EE services with Arquillian and JUnit to validate todo app persistence, entity creation, and database interactions.
Learn to test services with Arquillian and JUnit by creating and persisting a todo object, verifying injections, IDs, and database persistence, then discuss GP callbacks.
Explore Jakarta EE JPA entity lifecycle callbacks that trigger at key moments for custom initialization. Use prepersist and preupdate to set created dates and manage updates, including callback reuse.
Learn how JPA entity lifecycle callbacks trigger actions during entity life cycles to ensure operations run correctly and data stays consistent.
Examine the getSingleResult method in EntityManager, highlighting no results and non-unique result exceptions that can crash production. Learn to guard with try-catch and safer query patterns.
Examine the problems with getSingleResult in the EntityManager, showing how NoResultException and NonUniqueResultException arise and how to test and fix the behavior for reliable persistence.
Explore the pitfalls of getSingleResult on EntityManager, learn test strategies to catch exceptions, verify id retrieval, and ensure correct persistence behavior in Jakarta EE todo app.
Explore how data sources abstract database connections, replacing the in-memory default with configurable connections to databases. Learn declaring a data source with annotations, naming, and driver details.
Create and configure a data source for the todo app by wiring the sequel lite database driver, setting the url, username, and password, and linking it to the persistence unit.
download and set up a sqlite database across Windows and Linux, extract precompiled binaries, create and test the database via the command line, and run tests to verify population.
Run your app on SQLite by defining the to-do table and entity with id as the primary key, ensuring portable SQL across databases and seamless app execution.
Explore the Java Persistence API concepts, including entities, mapped superclass, table customization, constraints, joins, JPQL, and exposing data via restful web services.
Explore exposing application data over REST web services using the Java API for RESTful web services (JAX-RS) to build simple yet powerful web services.
extend the application class and annotate it with an application path to set the rest root. access resources under that api root and version paths as needed.
Discover how to expose resources with restful web services by defining precise paths using @Path. Explore hosting classes at root paths, nested routes, and dynamic segments.
Expose a TodoUser REST resource class that supports create, find by email, find by name, login, and password reset operations to manage user data and authentication.
Build a todo rest resource class that creates todos and queries by status and due dates, with endpoints to mark complete or uncomplete and archive items.
Explore resource validation in Jakarta EE: validate representations of entities before processing requests, return clear client validation messages, and align restful resources with platform-agnostic representations.
Implement the TodoUserRest class to create a REST resource method for a todo app, detailing path setup, resource handling, and Jakarta EE REST integration.
Implement the TodoUserRest class to handle create resource via post requests and map rest endpoints, enabling proper get and post semantics for todo resources.
Implement and expose the TodoUserRest resource in Jakarta EE, define a create resource method, specify media types, and integrate json representations with Jackson for client-ready responses.
Implement the TodoUserRest resource to delegate user creation to a persistence service via CDI dependency injection, exposing a RESTful create operation and returning a meaningful response.
Implement the TodoUserRest class and run the code to see the rest resolves method in action. Deploy to a standalone container and test the TodoUserRest endpoint using Insomnia rest client.
Explore implementing the TodoUserRest class and testing a create flow with insomnia, posting user data (email and password), validating constraints, and handling responses from the todo rest service.
Learn how to stop a running Payara Micro server from the command line by pressing Ctrl+C and confirming termination, so you can continue your workflow.
Implement the update resource method in the TodoUserRest class to respond to post requests, validate IDs, use the persistence context, and return a structured update response.
Implement the TodoUserRest find-by-email resource method using dynamic path segments and dependency injection, supporting path and query parameters to retrieve a user by email.
Implement the TodoUserRest find by email resource method by handling missing user values with sensible defaults using a query parameter API class and proper parameter passing.
Explore implementing the TodoUserRest find by email resource method, using dynamic path segments and query parameters to retrieve a user by email, with defaults and injections ensuring proper rest behavior.
Enforce JAX-RS resource parameter constraints using the validation API to ensure values are set. Validate inputs before method execution, applying not null, finite set, and other constraints on resource fields.
Learn to implement jax-rs resource parameter constraints, validate requests, and deploy and test constraint violations on a todo app running on a micro server.
Apply the dry principle with class-level content type declarations in jakarta ee, covering consumes and produces for all methods. Override at the method level to fine-tune resource types.
Implement the TodoUserRest class and its search by name resource method in a Jakarta EE todo app, covering responses, resource design, and basic security considerations.
Learn how to use JPA native queries to count and validate unique todo users by email, and compare application level and database level approaches for enforcing email uniqueness.
Learn to create native JPA queries with the entity manager to count todo users by email, using subqueries, selecting from the todo table, and applying positional or named parameters.
Learn how to use JPA native queries to count TodoUser records by email, and return the count as a number instead of a list.
Learn how to use JPA native queries to count todo user records by email, preventing duplicates and speeding data checks by letting the database do the work.
Learn techniques to prevent double signup with the same email in a Jakarta EE todo app, including checking for existing users in the persistence context and exploring different approaches.
Prevent duplicate signups by validating new user emails against the database, ensuring no existing account uses the same email before creation, and handling conflicts with exceptions.
Learn how to prevent double signup by updating email only if it's not in use, using a count query with email and id conditions.
Prevent duplicate signups by enforcing unique emails in post requests, and return meaningful error messages when duplicates occur. Test updates to resources and observe state changes and correct rest responses.
Develop and test a rest-based todo app by implementing find all, create, and update endpoints, deploying the app, and enforcing unique date constraints to prevent duplicates.
Explore how to safely update a todo item by verifying that both the email and ID exist in the database before updating, preventing duplicates.
fix a bug in a jakarta ee todo app by using an entity manager to find by email, manage the persistence context, and handle transactions in a stateless ejb.
Fix the bug and run the code to validate persistence updates in the Jakarta EE todo app, and discuss why application-level uniqueness is favored over database constraints.
Enforce a unique constraint on the email column in the Jakarta EE todo app's rest class, and handle violations at the application level with a simple field count and abort.
Implement the TodoRest class list resource method to return all todos for the currently authenticated user in the todo app, using session email for filtering.
Implement the TodoRest class by using a dynamic JPQL query with the entity manager to find a todo by id, set parameters, and return the first result.
Implement the TodoRest resource method to mark a todo as completed, explore two update approaches—direct entity update and JPQL update—refresh the persistence context, and return an OK response.
Implement the TodoRest class and its get all completed todos resource method in a Jakarta EE REST service by querying completed tasks and returning them.
Implement the get all completed todos endpoint in the Jakarta EE todo app by using a single private method to fetch by completion state, avoiding code duplication.
Explore implementing the TodoRest class to retrieve all todos by due date, using group expressions and date handling, including validation and API integration.
Implement the TodoUserRest class to mark a todo as archived via its resource method, setting the archived flag to true and returning a proper response.
Explore adding third-party libraries and importing necessary dependencies to enable JSON Web Token (JWT) authentication in a Jakarta EE todo app, then create login and secured resources to implement security.
Explore how JAX-RS filters intercept requests between clients and resources, enable JWT-based authentication, protect REST endpoints, and manage access with token generation and validation.
Explore JWT authentication using JAX-RS filters by implementing a login resource method and user creation flow within a Jakarta EE todo app.
Demonstrates JWT auth with a login resource method using JAX-RS filters, validating email and password, and generating a token on successful authentication to return in the response header.
Learn to implement jwt authentication using jax-rs filters by validating a user's credentials, hashing with salt and iterations, and generating a signing key to issue a token.
Implement the SecurityUtil class to power JWT authentication with JAX-RS filters, enforce security checks, handle authentication failures, and generate appropriate client responses.
Authenticate users via a login resource method, generate a signed jwt with a 15-minute expiration, and return a bearer token for authorized access.
Explore how JWT authentication with JAX-RS filters enables secure login for a todo app, including password hashing, email-based lookup, and generating tokens with expiration and audience.
Implement jwt authentication with jax-rs filters in jakarta ee, using a login resource that accepts form data and returns a token in the header, while hashing passwords with salt.
Discover how to implement JWT authentication with JAX-RS filters in a Jakarta EE todo app, including password hashing, token generation, and protecting resources via authorization headers.
Discover how jwt.io demonstrates an industry standard method for representing claims between two parties with jwt tokens, including subject, email, issued at, and a 15-minute expiry to access resources.
Implement JWT authentication in Jakarta EE by creating a @SecureAuth name binding, applying it to resources or methods, and using container request and container response filters.
Learn how to implement JWT authentication in a Jakarta EE todo app by using a JAX-RS ContainerRequestFilter and binding it to a custom annotation to secure specific methods.
Implement JWT authentication with JAX-RS container request filter to secure a Jakarta EE todo app, covering authentication timing, authorization decisions, and registering filters for runtime priority.
Implement JWT authentication in a Jakarta EE REST app using a container request filter to read the authorization header, verify the token, and grant or deny access.
Develop and enforce JWT-based authentication in a JAX-RS ContainerRequestFilter by reading the Authorization header, validating the Bearer token, and returning proper unauthorized responses.
Implement JWT authentication using a ContainerRequestFilter in a JAX-RS app, validating tokens, handling exceptions, and securing incoming requests.
Implement jwt authentication with a jax-rs container request filter to secure resources, enforce authorization, and return proper responses via an authorized exception.
Explore how JWT authentication and JAX-RS filters secure a REST resource in a Jakarta EE todo app, test authorization, and verify that secured endpoints respond only to authorized requests.
Implement JWT authentication with JAX-RS filters and improve error handling by returning consistent unauthorized responses for protected resources in an API.
Secure rest endpoints with JWT auth using JAX-RS filters and test protected resources. Learn to craft semantic error responses in the body and verify authentication and authorization flow.
Explore securing resource methods in the TodoUserRest class, securing create, query by email, search, and site endpoints while allowing some resources to remain anonymously accessible and iterating security rules.
Secure all methods in the TodoRest class using API security constructs, test responses, and verify access to protected resources while highlighting the role of security experts.
Run and deploy the Jakarta EE todo app by compiling the code, registering components with the runtime, and enforcing security through request context, authorization checks, and login-based access control.
Explore securing a jakarta ee app by implementing authentication and authorization for protected resources, hashing passwords, and building a to-do REST service with secure access and token-based checks.
Create and manage todo items using a Jakarta EE REST backend, defining task and due date objects, and perform create, get, update, and complete operations.
Learn how to implement JWT authentication with JAX-RS filters in Jakarta EE, using the security context to access user information and keep authentication self-contained and avoid exposing passwords.
Explore how to instantiate and attach a security context to the request scope in jakarta ee, exposing the current authenticated principal through a decoupled interface for secure access.
Learn to access the security context to retrieve the subject's email from claims, using the principal object and injected context to preserve or override the request context.
Learn how to derive the current principal from a security context, replace session reliance, and refactor query services to use the security context for stateless request handling.
Explore securing jakarta ee apps by substituting session-based data with a security context and cdi injection, extracting the principal and email from a contextual security context.
Utilize the security context with an application-scoped bean in the CDI container to generate and reuse a strong secret key for signing and authenticating data across requests in Jakarta EE.
Fix the app by resolving a syntactically incorrect client request and faulty payload after refactoring, aligning the API, data mapping, and password field handling for correct runtime behavior.
Learn to customize the message writing process in jakarta ee by implementing a custom messagebodywriter, registering it with jax-rs, and marshaling java objects to client representations via output streams.
Investigate a null pointer and EJB exception by tracing server errors, classic persistence issues, and the line where security context injection reveals the root cause.
Identify and fix the null security context issue causing a null pointer exception in the persistence service by ensuring a properly initialized principal before invoking secured resources.
Debug and resolve a null pointer exception in the query service ejb by inspecting injected components, authentication checks, and query refactoring to ensure correct criteria for user-based queries.
Learn to build a todo app with Jakarta EE by implementing API calls, marshalling request and response bodies, handling JSON data, and testing end-to-end login and data access.
Discover how to control JSON-B serialization in Jakarta EE by applying @JsonbTransient to fields like password and salt, preventing sensitive data from being marshaled while keeping necessary fields intact.
Demonstrate running the todo app with Jakarta EE REST calls to create and list tasks. Show secure, stateless server interactions and resource links in responses.
Implement hypermedia in jax-rs with json-p to return the newly created todo via a direct path. Dynamically generate links and resource paths by id.
Explore how hypermedia rest with jax-rs and json-p api enables dynamic path resolution, id routing, and access to application requests for a todo app.
Explore building a hypermedia-driven REST API with JAX-RS and JSON-P, mapping resources with paths, creating resources, and enabling client navigation through linked responses.
Explore hypermedia in jax-rs with json-p api by building and linking objects, and learn to pass data in both the body and header as your application dynamically constructs resources.
Explore hypermedia driven REST with JAX-RS and JSON-P in a Jakarta EE todo app, learn to run and test endpoints, create tasks, and manage due dates.
Explore hypermedia JAX-RS with JSON-P, demonstrating a post request and embedding JSON data in both the head and body, and navigating via links to resolve resources.
Build a hypermedia driven REST API with jax-rs and json-p api, running the app to generate dynamic links to todo resources and related actions.
Discover why JAX-RS exception mappers matter and how to tailor client-friendly error messages by mapping validation constraints to meaningful responses.
Explore implementing constraint violation exceptions and exception mappers to translate validation errors into clear, actionable messages for clients in Jakarta EE apps.
Learn how to return meaningful validation error messages with exception mappers in Jakarta EE, mapping constraint violations to clear property and message fields in client responses.
Discover how to return meaningful validation error messages using exception mappers, customize constraint violation messages, and provide clear feedback when password and other rules are violated.
Explore returning meaningful validation error messages with exception mappers in Jakarta EE, and document constraint violations in your API docs so clients know how to provide and interpret error data.
Learn to return meaningful validation error messages with exception mappers in Jakarta EE, mapping constraint violations to field keys for clear client feedback.
Learn how to apply http cache-control directives to responses, using max-age and private/no-store options to optimize client-side caching for todo resources.
Learn to package Jakarta EE applications locally with docker, create a Microsoft cloud account, push images to a repository, and deploy container web apps for public access.
Modify the project object model and plugins to integrate docker deployment, configure registry authentication and image naming, and push docker images for cloud deployment of the Jakarta EE todo app.
Learn how to deploy Jakarta EE applications to the cloud with Docker by setting up cloud access, configuring credentials, updating the content registry, and pushing containers through a guided workflow.
Learn how to set up an Azure container registry, configure credentials, and push docker images to a private registry for cloud deployment.
Build a Docker image from Jakarta EE project, run a container to test, and push the image to a container registry before deploying to the Microsoft cloud web app.
Publish a Jakarta EE todo app by building a Docker image, pushing it to a private container registry, and deploying an Azure web app for internet access.
Deploy a Jakarta EE todo app by building and running containers in a dockerized Azure Web App, using the container registry and traffic routing for a live deployment.
Explore deploying a Jakarta EE todo app to the cloud with Docker, including packaging the app, pushing to a private registry, and testing the deployed service.
Review Jakarta EE cloud deployment with Docker by recapping exposing REST resources, signing up and logging in, and deploying to the cloud using container registries.
Develop and test a Jakarta EE todo app by refining header data passing, pushing code changes to the repository, and deploying updates with Docker in the cloud.
Master Jakarta EE cloud deployment with Docker by making and pushing changes to a todo app, linking head and body objects, and updating the container image in the cloud registry.
Demonstrates continuous deployment of Jakarta EE apps to the cloud with Docker, testing pushed changes by updating a todo app's data and validating login and task management.
In this lecture, we define what Java EE (Jakarta EE) is from the perspective of a developer.
In this video, we take a look at what an app server is and how it relates to Java EE (Jakarta EE)
In this video, we take a look at what the definition of a Java Specification Request is.
A reference implementation is the concrete realization of an abstract API, freely available to test and run the Jakarta EE specification using real-world frameworks like GlassFish.
Jakarta EE continues Java EE under the Eclipse Foundation, rebranding from Java EE to Jakarta, with changes while remaining familiar to developers, and aims to be cloud-native, open, and industry-wide.
Compare Jakarta EE (formerly Java EE) and the Spring Framework as powerful enterprise platforms, noting Jakarta EE's sensible defaults and annotation-driven style versus Spring's ease of use and Spring Boot.
Start developing modern software with Jakarta EE (formerly Java EE) today!
If you're looking for a software development platform that will allow you develop modern, powerful, secure and portable applications, then Jakarta EE (formerly Java EE) is the answer. Jakarta EE is used by professional software developers from across the world in all forms of domains- from finance to healthcare to robotics. This course is the most practical way to jump right in and start developing with Jakarta EE.
Build any kind of software you can imagine with Jakarta EE. Practice while you learn. This course is completely hands on, and gives you all the source code for each step and lecture.
By the end of this course, you would have built a fully functional Todo app exposed as a web service running in a Docker container on Microsoft Azure!
We'll be using Jakarta EE (Java EE) 8 throughout this course. All you need is an implementation of the APIs, and we will be using the FREELY available Payara Server as our app container.
What's in it for you? Here's my promise to you.
I'm a Jakarta EE developer based in Accra Ghana. Nothing in this world excites me like sharing my knowledge of high productivity with Java EE with students from across the world. I'll be here for you every step of the way. Whenever you've a question, just ask in the course forums and I'll be more than happy to respond. I mostly respond to questions in less than an 1 of asking.
What is this course all about?
In this comprehensive guide to software development with Jakarta EE (formerly Java EE), you'll learn all there is to know about how to use this powerful, industry standard platform to develop any kind of software you imagine. You'll learn about the
Java Persistence API (JPA) for database access
Java API for Restful Web Services for crafting modern web services
Enterprise JavaBeans (EJB) API for crafting powerful business components
Contexts and Dependency Injection (CDI) API for crafting loosely coupled app
Integration testing using the Arquillian framework
Deployments using Docker container orchestration and so much more
Learn from someone who lives and breathes Java EE, is very passionate about helping you succeed with Jakarta EE and will be with you through it all.
By the end of this course, your confidence as a Java EE developer will soar. You'll have a thorough understanding of developing software with Jakarta EE, for fun or career advancement.
Go ahead and click the enroll button and I'll see you in lesson 1!
Cheers,
Luqman