On Jan 30, 2009, at 3:34 PM, Erick Dovale wrote:
> Folks,
> I can't get jersey to inject the HttpHeaders instance in a @Provider
> annotated entity provider (MessageBodyWriter) which is a spring
> managed bean with scope prototype.
You cannot use providers in anything other than the singleton scope.
I am surprised Jersey is not throwing an runtime exception in such a
case which states:
"The scope of the component <c> must be a singleton"
What version of Jersey are you using?
It is possible to share a simple maven project that reproduces your
problem?
Paul.
>
> The bean is defined in a spring context and jersey is successfully
> discovering it, however, jersey fails to inject the HttpHeaders
> instance.
> Has anyone had a similar problem before?
>
> Thanks.
>
> Erick.