Sergey,
I haven't look at the details and I'm not an expert of CDI at all, but my gut feeling is that any additional support of CDI injection directly by CXF could possibly clash with similar features already available in containers integrating CXF and targetting full JavaEE compliance. So, if an additional CDI support is being added, it should probably be possible to turn it off (though a configuration option, or such).
Just my 2cents

Alessio

On 10/02/14 13:23, Sergey Beryozkin wrote:
Hi Andrei
On 10/02/14 08:49, Andrei Shakirin wrote:
Hi Sergei,

Do you mean the full support of JSR-299 including stereotypes, qualifiers, alternatives or just support of @Inject annotation for some CXF security, message, context objects? The first seems to be a bit involved, however the second sounds reasonable for me.

Yes I agree, I think we should let the containers deal with most of it, but limit it to supporting @Inject.

In fact, I'd probably consider supporting it initially at the level shown at

https://github.com/abhijitsarkar/groovy/blob/master/movie-manager/movie-manager-web/src/main/groovy/name/abhijitsarkar/moviemanager/web/MovieResource.groovy

(The same will apply for JAX-WS).

The link above shows what JAX-RS 2.0 spec expects too from CDI-compliant implementations. The spec also mentions that @Inject may be supported for injecting JAX-RS annotated properties (example, instead of @Context UriInfo -> @Inject UriInfo) but should warn about the non-portability - I'd be OK with Tom EE supporting all of it (meaning the injection of contexts too) for JAX-WS/JAX-RS, but I guess it is up for the discussion.

I wonder, if some basic/straight-forward link can be supported in CXF to support the injection of beans into service classes via @Inject so that people can just add CDI RI dep and have it working ?

Thanks, Sergey







Regards,
Andrei.

-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Sonntag, 9. Februar 2014 19:43
To: CXF Dev
Subject: Optional support for CDI integration ?

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




--
Alessio Soldano
Web Service Lead, JBoss

Reply via email to