Before winding up this chapter, let's take a quick look at the life cycle of the JAX-RS components on the server when a client makes a RESTful web API call. This discussion would be a good summary of the topics that we learned so far on JAX-RS.
The following diagram depicts the sequence of actions taking place on the server when a client invokes the JAX-RS RESTful web service:
For an incoming REST API call, the container identifies the Java servlet configured for handling the REST API calls by parsing the URI, and then delegates the request to the designated servlet. The servlet initializes the JAX-RS runtime and kicks off the RESTful web service request processing cycle for the REST API call in the following sequence:
- The runtime executes prematching filters (ContainerRequestFilter with the @Prematching annotation), which happens...