users@jersey.java.net

Instatiating subResources with _at_Context class fields

From: tofferliu <toffer_liu_at_yahoo.com>
Date: Sat, 31 Jul 2010 20:27:51 -0700 (PDT)

Hi,

Is there a way to instatiate a subResource such that class member annotated
with @Context will still be injected with their respective values?

The problem with the approach below is that it creates the subResource
instance without injecting the value for "bar".

-Toffer

public class SubResource {

    @Context
    Foo bar;

}

@Path("/")
public class MainResource {

   @GET
   public SubResource getSubResource() {
      return new SubResource();
   }
}
-- 
View this message in context: http://jersey.576304.n2.nabble.com/Instatiating-subResources-with-Context-class-fields-tp5360153p5360153.html
Sent from the Jersey mailing list archive at Nabble.com.