What is the scope (@RequestScoped, @PerLookup or @Singleton) of
ParamConverterProvider(s)?
Inside one of my providers I'm trying to @Inject my own SmallBean for which
I have proper org.glassfish.hk2.api.Factory<SmallBean> (registered and
injection works in resource classes).
But I'm getting:
java.lang.IllegalStateException: Not inside a request scope
[...]
java.lang.IllegalArgumentException: While attempting to resolve the
dependencies of com.steatoda.mole.api.param.NewsParamConverterProvider
errors were found
In that same provider I can inject (using @Context) HttpServletRequest.
I'm aware that HttpServletRequest is one of "proxiable" classes that can be
injected even in Singletons. Are ParamConverterProvider(s) Singletons?
Since my SmallBean is just part of HttpServletRequest (stored as its
attribute), is there a way for me to inject it somehow in
NewsParamConverterProvider?
Tnx,
-gkresic.