Session-scoping a REST module of a Confluence plugin


I created a REST module and applied the @PerSession annotation to the root resource (above the @Path("/") annotation of the REST resource class). But, the resource is acting like a singleton. A new instance is never created for a new session. So, I removed the @PerSession annotation to make it the default Request scope (per Jersey 1.x docs), but it still acts like a singleton.

Does Confluence make all REST modules singletons??? Or, maybe I’m doing something wrong.