users@jersey.java.net

Re: [Jersey] Annotated Annotations

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 22 Jul 2008 12:14:57 +0200

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
modification.

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.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109