jsr366-experts@javaee-spec.java.net

[jsr366-experts] Re: semantics of metadata-complete

From: Kevin Sutter <sutter_at_us.ibm.com>
Date: Mon, 5 Oct 2015 16:43:59 -0500

Linda DeMichiel <linda.demichiel_at_oracle.com> wrote on 10/05/2015 04:05:31
PM:

> From: Linda DeMichiel <linda.demichiel_at_oracle.com>
> To: jsr366-experts_at_javaee-spec.java.net
> Date: 10/05/2015 04:06 PM
> Subject: [jsr366-experts] Re: semantics of metadata-complete
>
> Hi Kevin,
>
> On 10/5/15 1:39 PM, Kevin Sutter wrote:
> > Linda,
> > Overall, I like the clarifications. I think this helps clarify the
the
> > intent of the metadata-complete element for AppClient, EJBs, and,
> > eventually, Servlets. I'm still querying other extended members of my
> > team to see if they have any additional comments.
> >
> > The one question/concern that I have is that with these updates we
seem
> > to be defining metadata-complete depending on the context of the
usage.
> > That is, maybe we're not consistent... For example, with these
> > proposed updates, we're clarifying that metadata-complete should only
> > apply to deployment-related annotations. But, what about JPA's usage
of
> > metadata-complete? It's my understanding that JPA's metadata-complete
> > applies to all annotation processing. Or, are you looking to clarify
> > this usage as well? If we're not consistent with the scope of this
> > element, then it might make for confusing processing.
>
> In JPA, the xml-mapping-metadata-complete element applies to the OR
> mapping metadata. I think the JPA spec is quite clear on this.
> It doesn't apply to the use of other annotations (e.g., @Inject,
> which can be used in entity listeners).
>
> I wasn't planning any clarifications here. What do you think is needed?

Maybe nothing... Having the separate xml-mapping-metadata-complete
sufficiently delineates this from the metadata-complete element you are
describing in your clarifications. I wasn't referring to that. I was
referring to the metadata-complete element for the entity,
mapped-superclass, and embeddable elements. For example, the javadoc for
<entity..> states:

Alternatively, the metadata-complete attribute can be used to
      indicate that no annotations on the entity class (and its fields
      or properties) are to be processed.


This is a well-documented and clear, and maybe that's sufficient. My only
concern is that the scope for metadata-complete for entity, for example,
affects all annotations is more encompassing than your proposed update for
metadata-complete and AppClient or EJB deployment annotations.

Again, maybe this is considered to be clear enough and no additional
clarifications are required. Just curious if anybody else had this same
question.

Thanks,
-- Kevin Sutter

>
> >
> > Thanks,
> > -- Kevin Sutter
> >
> >
> > Linda DeMichiel <linda.demichiel_at_oracle.com> wrote on 09/24/2015
> > 02:28:42 PM:
> >
> > > From: Linda DeMichiel <linda.demichiel_at_oracle.com>
> > > To: jsr366-experts_at_javaee-spec.java.net
> > > Date: 09/25/2015 04:39 PM
> > > Subject: [jsr366-experts] semantics of metadata-complete
> > >
> > > One of the items that needs to be made clearer in our specs is the
> > > meaning of a "true" value for the metadata-complete attribute, as
we
> > > have noticed that people seem to get confused as to its exact
meeting
> > > with regard to annotation scanning.
> > >
> > > The intent here is not to not process all annotations, but rather
to
> > > not process those annotations that are covered by the metadata of
the
> > > deployment descriptors that specify metadata-complete.
> > >
> > > I've attached below proposed clarifications for the Java EE 8
Platform
> > > spec, which covers the application client descriptor, as well as
for
> > > the EJB spec, with the goal of making this more precise. We are
also
> > > planning similar clarifications for the Servlet spec.
> > >
> > > Please let me know if you see any problems.
> > >
> > > thanks,
> > >
> > > -Linda
> > >
> > >
> > > [attachment "metadata-complete-appclients" deleted by Kevin Sutter/
> > > Rochester/IBM] [attachment "metadata-complete-ejb" deleted by Kevin
> > > Sutter/Rochester/IBM]
>