Re: CDI integration
Pavel Bucek
Hi Guillermo, this is problematic at least. If there is no API in the CDI spec
for requested feature, it would mean that the spec depends on an
implementation feature of CDI container (I believe it is Weld in
this case). What if someone would like to run against different
CDI implementation? That would force JAX-RS implementations to create container
specific code for each container which it wants to integrate with.
I do see that it might not be a problem for some implementations,
especially when there is some impl which is designated to live
only in single specific container, but generally it could
potentially limit some JAX-RS implementers. Ad @Stereotype - I'd need to check whether we can easily do that, since it would create a dependency on javax.enterprise.inject. I don't understand the remark about that annotation not being there in the runtime - it will be there, it has retention runtime (otherwise it wouldn't work). Maybe you meant that it won't be necessary to add it to JAX-RS Resource, which already has @Path annotation. Also, @RequestScoped would need to be added as well, since JAX-RS resources are request scoped by default. So what if we have @Stereotype and @Path is used as an annotation on a class - is it possible to somehow override the scope to something else? Also, would it be an issue if @Path is used on a resource method? (which is a valid usecase) Thanks,
On 01/06/2017 20:20, Guillermo González
de Agüero wrote:
|
|