Hi guys,
I have done some work trying to make CXF and CDI (Weld 2.x) working
together and though I failed to make it work, I have got the approximate
understanding how it might be implemented.
>From my prospective, to get basic @Inject working won't be very hard. The
one assumption I have is that we don't have objection to use JNDI as it is
the (one of) way to share BeanManager instance.
Or we may look on Weld SE to see the possible alternatives to create and
share BeanManager instance in non-JEE environments so we can have similar
implementation in CXF.
Thanks.
Best Regards,
Andriy Redko
On Mon, Feb 10, 2014 at 11:50 AM, Sergey Beryozkin <[email protected]>wrote:
> Hi Christian
>
> On 10/02/14 16:01, Christian Schneider wrote:
>
>> Hi Sergey,
>>
>> CDI support could be quite interesting indeed. I already started
>> experimenting with it too.
>> See:
>> https://github.com/cschneider/Karaf-Tutorial/tree/master/
>> tasklist-cdi/tasklist-webservice/src/main/java/net/lr/cxf/cdi
>>
>>
>> I think we have to create a portable CDI extension like the ones in
>> apache deltaspike:
>> http://deltaspike.apache.org/documentation.html#module-overview
>> In my experiments I even used a less advanced aproach and just created a
>> custom annotation that is processed by cdi. This is probably not enough
>> for good support though.
>>
>> So I propose we first experiment in some directions and then try to work
>> out a first design.
>>
>> That looks interesting; if we talk about the two options Andrei
> mentioned, I guess you'd like to follow the first one, i.e, have a pretty
> comprehensive support, right ?
> I wonder, what can we do to get a basic @Inject (ion) of CDI beans into
> CXF service classes working ? That would do for a start for me :-)
>
> DeltaSpike looks interesting; I wonder if one can delegate to it in Java
> SE...for it to inject the beans
>
> Cheers, Sergey
>
>
>
>> Christian
>>
>>
>> On 09.02.2014 19:43, Sergey Beryozkin wrote:
>>
>>> Hi All,
>>> Does it make sense to offer some optional support for CDI directly in
>>> CXF ? I guess we can expect more and more queries about it going forward,
>>>
>>> I'll want to investigate more about it in scope of the JAX-RS 2.0 spec
>>> work anyway, but I wonder what can be done in CXF in general
>>>
>>> Thanks, Sergey
>>>
>>
>>
>>
>