Request scope

In a web application, every HTTP request from a client gets a new bean instance if the bean is scoped as a request. On an HTTP request completion, a bean will immediately be considered out of scope, and memory will be released. If a server has 100 concurrent requests, then there will be 100 distinct instances of a bean class available. If there is any change in one instance, it will not affect other instances. Following is an image of the request scope:

Get Java 9 Dependency Injection now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.