Re: CDI integration
Guillermo González de Agüero
Hi Pavel, First, thanks for taking the time to consider this. On Fri, Jun 2, 2017 at 3:33 PM, Pavel Bucek <pavel.bucek@...> wrote:
Arjan has summarized the idea. With this option, JAX-RS implementations themselves will stay the same as today. Taking Jersey as an example, if I'm an application server vendor, it will be my job to find a CDI implemenetation that allows me to make @Path behave like a "bean defining annotation". But Jersey won't have nothing to do with it.
I meant CDI will only be needed at (JAX-RS implementation) compile time.
Applications won't need it as annotations not present on the classpath
are just erased at runtime. So people using Spring or wathever non-CDI
framework won't see any difference. Hope it clearer now?
Of course. Annotations directly present on the class take precedence here [1], so noone will see any side effect if they had already defined a different scope.
This would not affect it either. CDI only uses stereotypes on beans, so if that method is not annotated also with javax.enterprise.Produces, CDI will not use it. And again, that default scope could be overrided.
Regards, Guillermo González de Agüero [1] http://docs.jboss.org/weld/
|
|