Hi cxf group, Could you please respond to my question below? The main question is if Context get/set is allowed in JAX-RS filters? I need an answer urgently as I need to deliver some code by tomorrow And I need to figure out whether to implement a work around or there is Something simple I am missing and have overlooked in using JAX-RS CXF?
Thanks very much for your help in the past. Hope to hear from Someone soon. Sadhana -----Original Message----- From: Sadhana Jain [mailto:[email protected]] Sent: Monday, September 28, 2009 10:53 AM To: [email protected] Subject: Accessing JAX-RS MessageContext in a filter Hi All, I am trying to get access to MessageContext in a filter (that implements RequestHandler interface) by doing this: private MessageContext mc; @Context public void setMessageContext(MessageContext msgC) { mc=msgC; } Because I saw in the list that a bug was filed about if @Context was used on a fields like this: @Context private MessageContext mc; But even using Context on the setter does not work. Do I need to do any wiring in the Spring file when I use the Setter like above? Is @Context suppose to work with filters ( I thought they should as filters are like providers)? What I am trying to do using Context is set a Map that I created in the filter after processing http headers And I want to access that Map in some other class later in the code and would like to use @Context to get the map. Is this a good use of @Context? Or can I do this in any other way? Thanks a lot for any help. Sadhana Sadhana Jain Sr. Software Engineer Rovi Corporation 795 Folsom St, Suite 200 San Francisco, CA 94107 Direct: 415.247.5023 | Mobile: 925.212.6495 [email protected] rovicorp.com Rovi. The new name for Macrovision.
