By default, every time a new request is made, a new instance of the root-resource class is being created. The scope of the root-resource class, which is created at the time of request, is limited to that request only. This makes it easier to manage and work in isolation. It helps us in handling multiple concurrent requests to the root-resource class. We don't need to manage anything to handle multiple concurrent requests.
If we manage a single root-resource class instance to process multiple concurrent requests, we will face performance issues for the same. A new instance for every request makes it easier for JVM to go for garbage collection of the created and destroyed instance that served the request. We can also define a root-resource class as Singleton for a single instance of multiple requests.
Let's now look at the resource scopes: