I was slightly hesitant to propose that, since @RolesAllowed is from common annotations (JSR 250), that is used by many other things in the world. In Java EE that's EJB. I don't think anyone wants to update EJB at this point, but if we change @RolesAllowed it would be somewhat weird that all new attributes would only work in CDI and not in EJB. Various custom filters in JAX-RS as discussed above already interpret @RolesAllowed themselves, so changing this into a CDI intercepter binding annotation could result in some clashes and/or weird behaviour depending on whether the JAX-RS resource is also a CDI bean or not, and/or JAX-RS switches over to CDI completely.
A bit mentioned above, but to clarify; @RolesAllowed is currently a "plain" annotation, not a CDI interceptor binding one. There's ways around that. For example, a CDI extension could check for this annotation, and then add a CDI interceptor dynamically, but it's perhaps not as clean as starting with an annotation that's a CDI interceptor binding annotation from the start.
I'm not totally sure about what's best though, and maybe extending a already familiar annotation is easier for users, but just mentioning there are certain issues with doing that.
_______________________________________________
es-dev mailing list
es-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/es-dev