From the course: Learning Java Enterprise Edition
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
CDI in practice - Java EE Tutorial
From the course: Learning Java Enterprise Edition
CDI in practice
- [Instructor] In this video, we're going to take a look at how CDI is used in practice, and in particular how we are using it in the Cargo Tracker application. We will see examples of CDI annotations such as inject, named, ApplicationScoped, and RequestScoped, and how JSF interacts with scoped beans. Okay, so let's get started. Let's revisit the Cargo Tracker application, and this time, we will visit the Administration Interface. This is the section of the Cargo Tracker site that exposes administration features, such as booking in new cargo, and viewing live updates of cargo location. Let's have a look at the dashboard. This screen shows the current status of various cargos. Clicking on the Info icon of cargo with ID ABC123, we can see the cargo's current itinerary. As you can see, it shows the cargo's tracking ID, origin names, and destination, and other relevant details. Now let's go to the application code and see how this is implemented. First, we need to find the JSF view…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.