users@ejb-spec.java.net

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

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Mon, 06 Feb 2012 18:09:02 -0800

Returning back to it...


Pete Muir wrote:
> 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,

Do you mean not only add ANNOTATION_TYPE target, but spell them out
explicitly in the spec?

> and also require implementations to process this.
>

Do you suggest this feature to be available outside CDI?

If not, how will the derived annotations be different from the CDI
@Stereotype?
>
>>> 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.