users@jsr311.java.net

Re: UriInfo.getAncestorResources

From: Stephan Koops <Stephan.Koops_at_web.de>
Date: Wed, 18 Jun 2008 16:21:50 +0200

Hi Sergey,
> Yes. But the specification says that only the classes created by the
> JAXRS runtime (the root classes that is)
> can be injected. Is it correct ?
These is only valid for field and bean setter injection, AFAIK. Do you
think, this is this not clearly enough defined in the spec?
> If so thenn neitgher Bar not its own sublocators won't have UriInfo
> injected by the runtime, but it's up to the root class to propagate it
> further, in which case UriInfo impl won't be aware it's being accessed
> in teh scope of a subresource locator.
you could request it into a (sub) resource method.

best regards
   Stephan