Re: Annotated Annotations

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Annotated Annotations

Paul Sandoz
Matt Brozowski wrote:
> I guess what I was thinking was that if while doing resource scanning,
> if it failed to find an certain annotation (such as @PerRequest)
> directly on a class, but it was annotated with annotations who were
> themselves annotated then the class should be considered to be annotated.

Resource scanning searches for classes annotated with @Path. The
processing of the life-cycle annotations happens later on.

IIUC what you want is currently not possible without either modifying
annotations to enable them to be meta-annotations or some byte-code

We might be able to solve the specific problem of life-cycle. It is
possible to speicify the default resource provider (when there is no
annotation for life-cycle on the class) that could do some additional
processing logic.

For example, we could have a default spring resource provider that looks
for @Component/Scope in the absence of a Jersey specific annotation.


| ? + ? = To question
    Paul Sandoz

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]