users@javaee-spec.java.net

[javaee-spec users] [jsr342-experts] Re: Proposal for global CDI enablement

From: Jim Knutson <knutson_at_us.ibm.com>
Date: Fri, 14 Dec 2012 14:06:05 -0600

Pete Muir <pmuir_at_bleepbleep.org.uk> wrote on 12/13/2012 07:57:28 AM:
> >> OPEN ISSUE: Should auto-discover be false by default for
> beans.xml with version 1.1. This would mean that adding a beans.xml
> would have no impact on discovery for 1.1 apps, however it is a
> significant change from 1.0.
> >
> > No, please keep this in line with 1.0 behavior. If I think of the many
> > lightweight migrated applications that rely on backward compatibility:
> > Please don't change it!
>
> Note this would only be for beans.xml with the version attribute
> updated to 1.1 so it wouldn't happen without a user actively doing
> something. They could upgrade to the 1.1 schema, and set auto-
> discover to all to keep CDI 1.0 behavior (we would make the auto-
> discover attribute or element required).

I worry about making behavior decisions based on "DD" versions. It would
be better to make an explicit metadata declaration to change behavior.
Changing a version is necessary for syntax (i.e. I need to specify
additional metadata not supported in the current version, not for
behavior. Using a version change to modify behavior is like programming
with side effects. It will come back to bite you at some point.

Thanks,
Jim Knutson
WebSphere Java EE Architect