users@ejb-spec.java.net

[ejb-spec users] [jsr345-experts] Re: Meta-Annotations

From: Pete Muir <pmuir_at_bleepbleep.org.uk>
Date: Mon, 19 Dec 2011 16:29:25 +0000

On 16 Dec 2011, at 07:41, Marina Vatkina wrote:

> I think we need to sort this all out very slowly...
>
> Pete Muir wrote:
>> Possibly I misunderstood you. I meant we would need to specify that
>> the annotations to which we add the ANNOTATION_TYPE target would need
>> to be specified as usable as meta-annotations,
>
> Isn't an annotation with an ANNOTATION_TYPE target type, a meta-annotation by default? In David's example @Metatype seems to be a marker for the derived annotations (for easier processing?)

It is, but I think the spec needs to say what annotations can be used like this, and also require implementations to process this.

>
>> it's not enough to just
>> add the target to them... We would need to specify whether they can be
>> applied recursively or not etc.
>>
>
> Do you mean their derived annotations (like @Yearly in David's example)?

Yes.

>
> Another question: would we expect CDI to be responsible for processing those derived (@Metatype ?) annotations? Or would all other containers need to process them even if CDI is not enabled?

I guess it depends where they end up. We could tack this onto CDI, but I would prefer it in the platform or a new spec I think.