Learn your way! Get started

RESTful Services, Part 2: Injection and Sub Resources

with expert John Kidd

Watch trailer

RESTful Services, Part 2: Injection and Sub Resources  Trailer

Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack
  • Power Pack Plus

Release date Release date 9/22/2014
Level Level Intermediate
Runtime Runtime 1h 20m
Platform Platform Major browsers on Windows Major browsers on Windows Major browsers on Mac OSX Major browsers on Mac OSX Mobile Devices Mobile Devices
Closed captioning Closed captioning Included
Transcript Transcript Included
eBooks / courseware eBooks / courseware Included
Hands-on labs Hands-on labs N/A
Sample code Sample code Included
Exams Exams Included

Enterprise Solutions
Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More

Course description

Just like any modern framework running on a Java application server, JAX-RS defines a lifecycle for the resources that you create. In this course, you will learn about the JAX-RS lifecycles of Instance per request, as well as how singletons behave. Along with those topics we will also explore all of the elements that can be injected into a service to provide access to all the different parts of the HTTP request and response. Lastly, we will look at the power of sub resources.


This course assumes that the users have experience coding with Java. You should have already viewed the “RESTful Services: Overview and JAX-RS” course before viewing this course.

Meet the expert

John Kidd John Kidd is a nationally recognized instructor and consultant who travels the country sharing his expertise in java enterprise, SCRUM, and big data and related technologies. John has over 20 years of teaching and project development experience, including roles from developer to vice president of research and development. John is also a popular speaker at several conferences in both U.S. and Europe.

Course outline

Injection and Sub Resources

Life Cycle (21:40)
  • Introduction (00:22)
  • Demo: Review & New Resource (05:13)
  • Demo: Singletons (05:07)
  • Demo: Singletons vs Inst./Req. (05:15)
  • Demo: Only two options (05:32)
  • Summary (00:09)
Injection (22:12)
  • Introduction (00:24)
  • Demo: Context (05:20)
  • Demo: Uri Info (04:59)
  • Demo: Return to Singleton (05:28)
  • Demo: More Context (cont.) (05:46)
  • Summary (00:12)
SubResources Continued (16:45)
  • Introduction (00:15)
  • Demo: Run the Code (05:40)
  • Demo: Delegation (05:20)
  • Demo: Reality (05:21)
  • Summary (00:08)
SubResources (20:15)
  • Introduction (00:17)
  • Demo: Add Resource & Classes (05:15)
  • Demo: Sub Resources (cont.) (04:50)
  • Demo: The Resource (04:44)
  • Demo: How It Works (cont.) (04:53)
  • Summary (00:13)