But I already have as stated in the mail:


2014-07-03 13:57 GMT+02:00 Sergey Beryozkin <[email protected]>:

> On 03/07/14 12:49, David Karlsen wrote:
>
>> Sorry, I was a bit quick (or have done some other changes in the mean time
>> to break it).
>> I have this:
>> @Component
>> public class ContextHolder
>> {
>>      private final Logger logger = LoggerFactory.getLogger( getClass() );
>>      private WebServiceContext webServiceContext;
>>      private MessageContext jaxrsContext;
>>
>>      @Inject
>>      public void setWebServiceContext( WebServiceContext
>> webServiceContext )
>>      {
>>          this.webServiceContext = webServiceContext;
>>      }
>>
>>      @Context
>>      public void setJaxrsContext( MessageContext jaxrsContext )
>>      {
>>          this.jaxrsContext = jaxrsContext;
>>      }
>>
>>
>> but jaxrsContext is null!
>>
>> Do I need to wire up a bean as well?
>>
>
> You need to have 'setMessageContext'.
> Cheers, Sergey
>
>
>>
>> 2014-07-02 12:07 GMT+02:00 Sergey Beryozkin <[email protected]>:
>>
>>  On 01/07/14 16:33, David Karlsen wrote:
>>>
>>>  Great - that worked just fine!
>>>> Maybe the wiki should be updated?
>>>>
>>>>
>>> Sure, I should've done it earlier, Colm reported it too.
>>> I updated the migration page and that wiki page
>>>
>>> Cheers, Sergey
>>>
>>>
>>>
>>>> 2014-07-01 16:27 GMT+02:00 Sergey Beryozkin <[email protected]>:
>>>>
>>>>   Hi
>>>>
>>>>>
>>>>> On 01/07/14 14:35, David Karlsen wrote:
>>>>>
>>>>>   Looking at
>>>>>
>>>>>> http://cxf.apache.org/docs/jax-rs-and-jax-ws.html "Dealing with
>>>>>> context", a
>>>>>> MessageContext is @Resource injected into the example.
>>>>>> I guess this is a
>>>>>> http://cxf.apache.org/javadoc/latest-3.0.x/org/apache/cxf/
>>>>>> jaxrs/ext/MessageContext.html
>>>>>> with it's imp:
>>>>>> http://cxf.apache.org/javadoc/latest-3.0.x/org/apache/cxf/
>>>>>> jaxrs/ext/MessageContextImpl.html
>>>>>> .
>>>>>> However i don't see a default constructor for it (it requires a
>>>>>> Message),
>>>>>> and such I don't understand how it gets injected in the example - am I
>>>>>> missing out of something?
>>>>>> I need to create a utility which get's access to the CXF internal
>>>>>> contexts,
>>>>>> to get access to ResourceInfo, http headers and so on.
>>>>>>
>>>>>>    Starting from 3.0.0 it needs a @Context annotation. Supporting
>>>>>> @Resource
>>>>>>
>>>>>>  annotations is limited to 2.7.x only. If it is a singleton then a
>>>>> thread
>>>>> safe proxy is injected at startup and then MessageContextImpl instances
>>>>> are
>>>>> inserted into it at runtime
>>>>>
>>>>> Thanks, Sergey
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Reply via email to