users@jersey.java.net

Re: [Jersey] Scopes should extend a common base-class

From: Gili <cowwoc_at_bbs.darktech.org>
Date: Mon, 6 Oct 2008 11:56:30 -0700 (PDT)

Sorry, my mistake. I was looking for a behavior similar to Guice. You are
right they do not extend a base class, but all their scope classes are
annotated using @ScopeAnnotation which my code can check for. I forgot that
PerRequest had a @ResourceFactory. I assumed that as the default it would
have none.

Thanks,
Gili


Paul Sandoz wrote:
>
>
> On Oct 6, 2008, at 8:35 PM, Gili wrote:
>
>>
>> Hi,
>>
>> Is it possible to make all Jersey scopes (such as @PerRequest)
>> extend a
>> common base-class? This would make it easier to scan annotations for
>> any
>> Jersey-specific scope instead of looking for specific ones by name.
>> It would
>> also help forwards compatibility if new scopes are added in the
>> future.
>>
>
> Annotation declarations, using @interface, do not behave like
> interfaces or classes and one cannot extend from a base annotation.
>
> You can look for the meta-annotation @ResourceFactory if you need to
> treat such annotations generically.
>
> Paul.
>
>> Gili
>> --
>> View this message in context:
>> http://n2.nabble.com/Scopes-should-extend-a-common-base-class-tp1301604p1301604.html
>> Sent from the Jersey mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>

-- 
View this message in context: http://n2.nabble.com/Scopes-should-extend-a-common-base-class-tp1301604p1301648.html
Sent from the Jersey mailing list archive at Nabble.com.