Re: CDI integration
Guillermo González de Agüero
Hi Pavel, It's not currently doable right now with the standard APIs. My original proposal was to require the application server to do it in a vendor specific manner. WildFly already does it that way [1]. The work there would most probably fall on CDI integration implementations. That was to prevent changes to the JAX-RS api.But there's also a standard way that would work, and that's marking annotating @Path with @Stereotype. Doing that will make CDI discover resources, without any more side effect I'm aware of. Should a future version decide resources should be request scoped, adding the @RequestScoped annotation to it will do the work. JSF already did something pretty similar with Converters, but with the @Qualifier annotation [2]. Given how annotations work on Java, it wouldn't be a problem for non CDI users not having those annotations on the classpath; they will just not exist at runtime. Do you think that's feasible? [1] https://github.com/wildfly/wildfly/blob/master/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsAnnotationProcessor.java#L48 [2] https://github.com/javaserverfaces/mojarra/blob/2fe586e0b9b23a11b9168b30610b2afadeecdb41/impl/src/main/java/javax/faces/convert/FacesConverter.java#L100 Guillermo González de Agüero
On Thu, Jun 1, 2017 at 10:56 AM, Pavel Bucek <pavel.bucek@...> wrote:
|
|