Hi all,
in my issue [1] I am facing a decision whether to include CDI stereotype
usage also in JAX-RS annotated methods. The problem is that to allow
stereotypes to be picked up by CDI they need to be placed on the producer
method or field [2] which means they need to be annotated by
*javax.enterprise.inject.Produces* annotation. This annotation already
clashes with JAX-RS *javax.ws.rs.Produces *and additionally impose problems
(ambiguous injection) when several methods with the same return type would
use stereotypes (I've created simple example at [3]). This is why I want to
ask for the community opinion whether or not should RestEasy support
stereotypes on JAX-RS methods.
[1]
https://issues.jboss.org/browse/RESTEASY-1821
[2]
http://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#declaring_stereotypes
[3]
https://gist.github.com/xstefank/914614d8250cdc40c0047f55cff484a2
Thank you,
Martin Stefanko
Software Engineer
JBoss Sustaining Engineering Team
Red Hat