microbenchmark for CDI performance
by Mark Struberg
Hi!
Weld folks, I need some help with a micro benchmark:
You know we've talked about disk footprint in SE, so I hacked together a small microbenchmark and as a side effect we also got what is really needed to have CDI running
https://github.com/struberg/cdi-performance
I'm curious about missing some dependency excludes for Weld.
could you please run
$> mvn clean dependency:copy-dependencies -DincludeScope=compile -PWeld -Dweld.version=2.2.5.Final
$> ls -al target/dependency/
and tell me which dependencies can be without having some CDI functionality missing?
Feel free to pimp the pom and ship a pull request.
txs and LieGrue,
strub
10 years
Important improvements for product development in CDI 2.0
by Thomas Andraschko
Hi,
we have a big product with many subproducts/projects and customizations for
some customers.
CDI and JSF is really doing a great job here but i found 2 really annoying
issues which could be improved:
- CDI-224: Allow decoration on classes, not only on interfaces
We created many interfaces the last months for our beans just to get
decoration working
This is really annoying as this interfaces are just overhead and actually
senseless for us.
- CDI-407: Specify @Named @Alternatives
Currently its not defined what should happen if a alternative has a
@Named and is activated via beans.xml in the current app:
@Named public class A
@Named @Alternative public class B extends A
or even something like:
@Named public class A
@Specializes public class B extends A
@Named @Alternative public class B2 extends B
IMO B and B2 should also be available via EL "a".
This are really important issues for standard cases.
It would be great to see it in CDI 2.0.
Best regards,
Thomas
10 years
Re: [cdi-dev] [VOTE] Using @Priority to order events instead of adding a parameter in @Observes
by Werner Keil
It seems, Java SE 8 despite released in 2014 used an OLDER version of JSR
250 (1.0 or 1.1 at most) than Java EE 7, where @Priority (from 1.2) is
included.
For consistency EE 8 will certainly keep it, but as of now, one would have
to ask SE 8 to include the new version. Since EE 8 will build on SE 8 that
seems like a conflict or at least redundancy if you have 2 identical
annotations in the same classpath;-)
So it isn't just an issue for CDI alone, somewhere before EE 8 goes final,
SE 8 will have to update to 1.2 or whatever is available then, so EE 8 can
simply build on top of it instead of including a newer version of the same
API in a pre-Jigsaw setup where this isn't a good thing to have, especially
not on a platform level;-)
Should the Spec Lead of 250 be able to update @Priority before SE 8 fixes
the inconsistency, then it would solve the Problems of both CDI 2 (light)
and the full EE 8 stack.
Werner
On Tue, Oct 28, 2014 at 12:50 PM, <cdi-dev-request(a)lists.jboss.org> wrote:
> Send cdi-dev mailing list submissions to
> cdi-dev(a)lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.jboss.org/mailman/listinfo/cdi-dev
> or, via email, send a message with subject or body 'help' to
> cdi-dev-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> cdi-dev-owner(a)lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of cdi-dev digest..."
>
>
> Today's Topics:
>
> 1. Re: [VOTE] Using @Priority to order events instead of adding
> a parameter in @Observes (John D. Ament)
> 2. Re: cdi-dev Digest, Vol 47, Issue 13 (Werner Keil)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 28 Oct 2014 07:48:53 -0400
> From: "John D. Ament" <john.d.ament(a)gmail.com>
> Subject: Re: [cdi-dev] [VOTE] Using @Priority to order events instead
> of adding a parameter in @Observes
> To: Antoine Sabot-Durand <antoine(a)sabot-durand.net>
> Cc: cdi-dev <cdi-dev(a)lists.jboss.org>
> Message-ID:
> <CAOqetn9rpHpZNUV8UfK5Bn=+0S_TgZv=
> QN2xLW79SA25p4pP9g(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> -1 (vote for a param in @Observes)
>
> The reason being, it sounds like there's a lot of unknowns/gaps with trying
> to do #1. Plus only part of 250 ships with the JVM, as the rest of it
> comes from the EE spec:
> https://javaee-spec.java.net/nonav/javadocs/javax/annotation/Priority.html
>
>
>
> On Tue, Oct 28, 2014 at 4:56 AM, Antoine Sabot-Durand <
> antoine(a)sabot-durand.net> wrote:
>
> > To add events ordering feature we have two choices:
> >
> > 1) Use @Priority from common annotation specification (JSR-250) (vote
> +1)
> > pros:
> > - more consistent with other ordering mechanism we already have in CDI
> > (Interceptors, decorators, Alternatives)
> > - more Java EE consistent
> >
> > cons:
> > - time consumed in JSR 250 MR participation (@Priority must be update to
> > support parameter for target)
> > - as @Priority is not part of Java SE, CDI light on java SE will have to
> > add the jsr250 jar as dependency only to have this annotation (which will
> > make it a little less light)
> >
> > 2) Add a parameter to @Observes annotation to give order to an observer
> > (vote -1)
> > pros:
> > - works out of the box (we can add this property without ask for other
> > specs modification)
> > - avoid two annotations to declare an ordered observer (simpler usage)
> >
> > cons:
> > - less Java EE spirit
> > - could be seen as an inconsistency with the way we order Interceptors,
> > Decorators and Alternatives.
> >
> > ????????????????????
> >
> > Who can vote? Everybody registered to this ML can vote. All votes will
> be
> > binding
> > How to vote? Answer this mail and vote +1 (for @Priority) 0 or -1(for
> > parameter in @Observes)
> > Vote will be closed in 72 hours
> >
> >
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev(a)lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> >
> > Note that for all code provided on this list, the provider licenses the
> > code under the Apache License, Version 2 (
> > http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> > provided on this list, the provider waives all patent and other
> > intellectual property rights inherent in such information.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.jboss.org/pipermail/cdi-dev/attachments/20141028/fe500398/at...
>
> ------------------------------
>
> Message: 2
> Date: Tue, 28 Oct 2014 12:50:14 +0100
> From: Werner Keil <werner.keil(a)gmail.com>
> Subject: Re: [cdi-dev] cdi-dev Digest, Vol 47, Issue 13
> To: cdi-dev <cdi-dev(a)lists.jboss.org>
> Message-ID:
> <CAAGawe2F9sw28==u28pexbMehB2V3Y=
> pvY1qS2YEZHoGmO+sFw(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Interestingly there is no @Priority in Java SE 8 see that JavaDoc:
>
> http://docs.oracle.com/javase/8/docs/api/javax/annotation/package-summary...
>
> Meaning we won't get that one via Java 8 anyway, and it shows, there could
> be flexibility to pick just the annotations you need for CDI 2 under the
> right circumstances, too[?]
>
>
>
> On Tue, Oct 28, 2014 at 12:43 PM, <cdi-dev-request(a)lists.jboss.org> wrote:
>
> > Send cdi-dev mailing list submissions to
> > cdi-dev(a)lists.jboss.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> > or, via email, send a message with subject or body 'help' to
> > cdi-dev-request(a)lists.jboss.org
> >
> > You can reach the person managing the list at
> > cdi-dev-owner(a)lists.jboss.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of cdi-dev digest..."
> >
> >
> > Today's Topics:
> >
> > 1. Re: [VOTE] Using @Priority to order events instead of adding
> > a parameter in @Observes (Werner Keil)
> > 2. Re: [VOTE] Using @Priority to order events instead of adding
> > a parameter in @Observes (Pete Muir)
> >
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Tue, 28 Oct 2014 11:43:31 +0000
> > From: Pete Muir <pmuir(a)redhat.com>
> > Subject: Re: [cdi-dev] [VOTE] Using @Priority to order events instead
> > of adding a parameter in @Observes
> > To: Werner Keil <werner.keil(a)gmail.com>
> > Cc: cdi-dev <cdi-dev(a)lists.jboss.org>
> > Message-ID: <A2F18F27-2750-4C0C-8CF0-BD1E50227087(a)redhat.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > No, it is part of the JDK - check out the packages available in your IDE,
> > or look at the Javadoc.
> >
> http://docs.oracle.com/javase/8/docs/api/javax/annotation/package-summary...
> > <
> >
> http://docs.oracle.com/javase/8/docs/api/javax/annotation/package-summary...
> > >
> >
> > We can get an MR no problem, however it is critical IMO that this update
> > makes it in the JDK in a timely fashion to avoid people having to use the
> > endorsed dir to upgrade JSR-250 (Antoine mentioned you have to add it as
> a
> > dependency, but it?s worse - you have to add it to the endorsed dir).
> >
> > > On 28 Oct 2014, at 11:40, Werner Keil <werner.keil(a)gmail.com> wrote:
> > >
> > > AFAIK that is not part of the JDK, thus it should make it easier to ask
> > them for a MR, last happened about a year ago:
> > https://jcp.org/en/jsr/detail?id=250 <
> https://jcp.org/en/jsr/detail?id=250
> > >
> > >
> > >
> > >
> > >
> > > On Tue, Oct 28, 2014 at 12:33 PM, Pete Muir <pmuir(a)redhat.com <mailto:
> > pmuir(a)redhat.com>> wrote:
> > > I would be +1 if we can get a commitment to update the version of
> > JSR-250 shipped in the JDK updated as well, otherwise -1
> > >
> > >> On 28 Oct 2014, at 10:13, Werner Keil <werner.keil(a)gmail.com <mailto:
> > werner.keil(a)gmail.com>> wrote:
> > >>
> > >> +1 for 1)
> > >>
> > >> Unlike @Inject the Maven JAR for JSR-250 is a bit bigger (~20kb) but
> > there are existing dependencies that are not part of the JDK, most
> notably
> > JSR-330.
> > >>
> > >> Not sure, if subpackages like "security" or "sql" under 250 matter at
> > all, if not, we could explore if the ideas for "stripping" libraries
> > proposed by Oracle may also work for SE/EE. This was discussed by OpenJDK
> > architects including Mark Reinhold with the EC. So far no real progress
> on
> > that, but till this JSR goes final or EE 8 it could work to get
> > dependencies a bit lighter, too.
> > >>
> > >> It is likely, some annotation JSRs not just 250 need overhaul, e.g. to
> > finally make use of JSR-308, so an MR for 250 could be cumbersome, but
> > seems much easier here than e.g. bringing JSR-305 back to life;-)
> > >>
> > >> Werner
> > >>
> > >>
> > >> On Tue, Oct 28, 2014 at 9:58 AM, <cdi-dev-request(a)lists.jboss.org
> > <mailto:cdi-dev-request@lists.jboss.org>> wrote:
> > >> Send cdi-dev mailing list submissions to
> > >> cdi-dev(a)lists.jboss.org <mailto:cdi-dev@lists.jboss.org>
> > >>
> > >> To subscribe or unsubscribe via the World Wide Web, visit
> > >> https://lists.jboss.org/mailman/listinfo/cdi-dev <
> > https://lists.jboss.org/mailman/listinfo/cdi-dev>
> > >> or, via email, send a message with subject or body 'help' to
> > >> cdi-dev-request(a)lists.jboss.org <mailto:
> > cdi-dev-request(a)lists.jboss.org>
> > >>
> > >> You can reach the person managing the list at
> > >> cdi-dev-owner(a)lists.jboss.org <mailto:
> > cdi-dev-owner(a)lists.jboss.org>
> > >>
> > >> When replying, please edit your Subject line so it is more specific
> > >> than "Re: Contents of cdi-dev digest..."
> > >>
> > >>
> > >> Today's Topics:
> > >>
> > >> 1. Re: microbenchmark for CDI performance (Mohan Radhakrishnan)
> > >> 2. [VOTE] Using @Priority to order events instead of adding a
> > >> parameter in @Observes (Antoine Sabot-Durand)
> > >> 3. No meeting tomorrow (Antoine Sabot-Durand)
> > >> 4. Updated Invitation: CDI weekly meeting @ Weekly from 18:00 to
> > >> 19:00 on Wednesday except Wed 1 Oct 18:00, Wed 15 Oct 18:00 or
> > >> Wed 29 Oct 18:00 (ASD Perso) (antoine(a)sabot-durand.net <mailto:
> > antoine(a)sabot-durand.net>)
> > >>
> > >>
> > >> ----------------------------------------------------------------------
> > >>
> > >> Message: 2
> > >> Date: Tue, 28 Oct 2014 09:56:14 +0100
> > >> From: Antoine Sabot-Durand <antoine(a)sabot-durand.net <mailto:
> > antoine(a)sabot-durand.net>>
> > >> Subject: [cdi-dev] [VOTE] Using @Priority to order events instead of
> > >> adding a parameter in @Observes
> > >> To: cdi-dev <cdi-dev(a)lists.jboss.org <mailto:cdi-dev@lists.jboss.org
> >>
> > >> Message-ID: <ECAAD9B3-649C-4856-BB24-82AB9EF41763(a)sabot-durand.net
> > <mailto:ECAAD9B3-649C-4856-BB24-82AB9EF41763@sabot-durand.net>>
> > >> Content-Type: text/plain; charset=utf-8
> > >>
> > >> To add events ordering feature we have two choices:
> > >>
> > >> 1) Use @Priority from common annotation specification (JSR-250) (vote
> > +1)
> > >> pros:
> > >> - more consistent with other ordering mechanism we already have in CDI
> > (Interceptors, decorators, Alternatives)
> > >> - more Java EE consistent
> > >>
> > >> cons:
> > >> - time consumed in JSR 250 MR participation (@Priority must be update
> > to support parameter for target)
> > >> - as @Priority is not part of Java SE, CDI light on java SE will have
> > to add the jsr250 jar as dependency only to have this annotation (which
> > will make it a little less light)
> > >>
> > >> 2) Add a parameter to @Observes annotation to give order to an
> observer
> > (vote -1)
> > >> pros:
> > >> - works out of the box (we can add this property without ask for other
> > specs modification)
> > >> - avoid two annotations to declare an ordered observer (simpler usage)
> > >>
> > >> cons:
> > >> - less Java EE spirit
> > >> - could be seen as an inconsistency with the way we order
> Interceptors,
> > Decorators and Alternatives.
> > >>
> > >> ????????????????????
> > >>
> > >> Who can vote? Everybody registered to this ML can vote. All votes
> will
> > be binding
> > >> How to vote? Answer this mail and vote +1 (for @Priority) 0 or -1(for
> > parameter in @Observes)
> > >> Vote will be closed in 72 hours
> > >>
> > >> _______________________________________________
> > >> cdi-dev mailing list
> > >> cdi-dev(a)lists.jboss.org <mailto:cdi-dev@lists.jboss.org>
> > >> https://lists.jboss.org/mailman/listinfo/cdi-dev <
> > https://lists.jboss.org/mailman/listinfo/cdi-dev>
> > >>
> > >> Note that for all code provided on this list, the provider licenses
> the
> > code under the Apache License, Version 2 (
> > http://www.apache.org/licenses/LICENSE-2.0.html <
> > http://www.apache.org/licenses/LICENSE-2.0.html>). For all other ideas
> > provided on this list, the provider waives all patent and other
> > intellectual property rights inherent in such information.
> > >
> > >
> >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> >
> http://lists.jboss.org/pipermail/cdi-dev/attachments/20141028/7a4d9ef6/at...
> >
> > ------------------------------
> >
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev(a)lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> >
> > Note that for all code provided on this list, the provider licenses the
> > code under the Apache License, Version 2 (
> > http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> > provided on this list, the provider waives all patent and other
> > intellectual property rights inherent in such information.
> >
> > End of cdi-dev Digest, Vol 47, Issue 13
> > ***************************************
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.jboss.org/pipermail/cdi-dev/attachments/20141028/ee9da88a/at...
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: image/gif
> Size: 186 bytes
> Desc: not available
> Url :
> http://lists.jboss.org/pipermail/cdi-dev/attachments/20141028/ee9da88a/at...
>
> ------------------------------
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider licenses the
> code under the Apache License, Version 2 (
> http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> provided on this list, the provider waives all patent and other
> intellectual property rights inherent in such information.
>
> End of cdi-dev Digest, Vol 47, Issue 14
> ***************************************
>
10 years, 1 month
working doc for Java SE booter and context control?
by Mark Struberg
Hi!
Is there already a document describing the JavaSE/boot integration as we discussed in our face2face meeting?
I would like to continue working on it. Anyone interested to brainstorm a bit about it?
LieGrue,
strub
10 years, 1 month
Re: [cdi-dev] Who will be at Devoxx ?
by Werner Keil
-1
With 3(!) conferences from JMaghreb to ApacheCon Europe my November is
almost more busy than Sep/Oct with JavaOne or JavaZone.
It seemed Antoine was also there, but maybe JMaghreb had his picture by
mistake. Now it's only Markus from Red Hat. Anybody from the CDI EG going
to JMaghreb?
Although I can't make it to see the DeltaSpike talk at ApacheCon Europe, I
hope, Mark and other Apache Committers should be there. Who else will be in
Budapest Sun (Speaker's dinner) or Mon while I am at ApacheCon?
Werner Keil | JCP Executive Committee Member, JSR 363 Co Spec Lead |
Eclipse UOMo Lead, Babel Language Champion | Apache Committer
Twitter @wernerkeil | @UnitAPI | @JSR354 | #EclipseUOMo | #Java_Social |
#DevOps
Skype werner.keil | Google+ gplus.to/wernerkeil
* JMaghreb 3.0: 6 Nov 2014, Casablanca, Morocco. Werner Keil, JCP EC
Member, JSR 363 Spec Lead, DevOps Guy will present "Triple-E' class DevOps",
"JSR 363"
* ApacheCon Europe: 17 Nov 2014, Budapest, Hungary. Werner Keil, JCP EC
Member, Apache DeviceMap Committer will present "Apache DeviceMap"
* Mobile Developer Conference kompakt: 18 Nov 2014, Hamburg, Germany.
Werner Keil, JCP EC Member, Apache DeviceMap Committer will present "DevOps
for Android", "Apache DeviceMap" (GER)
On Wed, Oct 29, 2014 at 2:25 PM, <cdi-dev-request(a)lists.jboss.org> wrote:
> Send cdi-dev mailing list submissions to
> cdi-dev(a)lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.jboss.org/mailman/listinfo/cdi-dev
> or, via email, send a message with subject or body 'help' to
> cdi-dev-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> cdi-dev-owner(a)lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of cdi-dev digest..."
>
>
> Today's Topics:
>
> 1. Re: CDI 2.0 first Face to face meeting feedbac (Jozef Hartinger)
> 2. Re: CDI 2.0 first Face to face meeting feedbac (Mark Struberg)
> 3. Re: CDI 2.0 first Face to face meeting feedbac (Jozef Hartinger)
> 4. Re: CDI 2.0 first Face to face meeting feedbac (Mark Struberg)
> 5. Who will be at Devoxx ? (Antoine Sabot-Durand)
> 6. Re: Who will be at Devoxx ? (Antonio Goncalves)
>
>
> ----------------------------------------------------------------------
>
> Message: 5
> Date: Wed, 29 Oct 2014 14:14:43 +0100
> From: Antoine Sabot-Durand <antoine(a)sabot-durand.net>
> Subject: [cdi-dev] Who will be at Devoxx ?
> To: cdi-dev <cdi-dev(a)lists.jboss.org>
> Message-ID: <329BADC0-226C-4779-BC9D-B24DDC88B520(a)sabot-durand.net>
> Content-Type: text/plain; charset=us-ascii
>
> Hi,
>
> If you're attending Devoxx and wish to participate to a CDI meeting,
> please raise your hand.
>
> Antoine Sabot-Durand
>
>
> ------------------------------
>
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider licenses the
> code under the Apache License, Version 2 (
> http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> provided on this list, the provider waives all patent and other
> intellectual property rights inherent in such information.
>
> End of cdi-dev Digest, Vol 47, Issue 20
> ***************************************
>
10 years, 1 month
Who will be at Devoxx ?
by Antoine Sabot-Durand
Hi,
If you're attending Devoxx and wish to participate to a CDI meeting, please raise your hand.
Antoine Sabot-Durand
10 years, 1 month
Re: [cdi-dev] No meeting tomorrow
by Werner Keil
Antoine,
Thanks for letting us know. Enjoy your vacation. Guess you're at JMaghreb
on Wed next week already, holding the meeting from there, or will it be
cancelled because of JMaghreb, too?
I shall arrive Wed late afternoon, depending on traffic (flight, cab,...)
so I probably won't make it for the chat, but a few of us get a chance for
a F2F there again.
Cheers,
Werner
On Tue, Oct 28, 2014 at 9:58 AM, <cdi-dev-request(a)lists.jboss.org> wrote:
> Send cdi-dev mailing list submissions to
> cdi-dev(a)lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.jboss.org/mailman/listinfo/cdi-dev
> or, via email, send a message with subject or body 'help' to
> cdi-dev-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> cdi-dev-owner(a)lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of cdi-dev digest..."
>
>
> Today's Topics:
>
> 1. Re: microbenchmark for CDI performance (Mohan Radhakrishnan)
> 2. [VOTE] Using @Priority to order events instead of adding a
> parameter in @Observes (Antoine Sabot-Durand)
> 3. No meeting tomorrow (Antoine Sabot-Durand)
> 4. Updated Invitation: CDI weekly meeting @ Weekly from 18:00 to
> 19:00 on Wednesday except Wed 1 Oct 18:00, Wed 15 Oct 18:00 or
> Wed 29 Oct 18:00 (ASD Perso) (antoine(a)sabot-durand.net)
>
>
> ----------------------------------------------------------------------
>
> Message: 3
> Date: Tue, 28 Oct 2014 09:57:48 +0100
> From: Antoine Sabot-Durand <antoine(a)sabot-durand.net>
> Subject: [cdi-dev] No meeting tomorrow
> To: cdi-dev <cdi-dev(a)lists.jboss.org>
> Message-ID: <0B46E996-BD88-4959-8E32-ADA6708D082C(a)sabot-durand.net>
> Content-Type: text/plain; charset=utf-8
>
> Hi guys,
>
> I?m on vacation this week, so I won?t be here for our meeting.
>
> Antoine
>
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider licenses the
> code under the Apache License, Version 2 (
> http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> provided on this list, the provider waives all patent and other
> intellectual property rights inherent in such information.
>
> End of cdi-dev Digest, Vol 47, Issue 11
> ***************************************
>
10 years, 1 month
Re: [cdi-dev] [VOTE] Using @Priority to order events instead of adding a parameter in @Observes
by Werner Keil
+1 for 1)
Unlike @Inject the Maven JAR for JSR-250 is a bit bigger (~20kb) but there
are existing dependencies that are not part of the JDK, most notably
JSR-330.
Not sure, if subpackages like "security" or "sql" under 250 matter at all,
if not, we could explore if the ideas for "stripping" libraries proposed by
Oracle may also work for SE/EE. This was discussed by OpenJDK architects
including Mark Reinhold with the EC. So far no real progress on that, but
till this JSR goes final or EE 8 it could work to get dependencies a bit
lighter, too.
It is likely, some annotation JSRs not just 250 need overhaul, e.g. to
finally make use of JSR-308, so an MR for 250 could be cumbersome, but
seems much easier here than e.g. bringing JSR-305 back to life;-)
Werner
On Tue, Oct 28, 2014 at 9:58 AM, <cdi-dev-request(a)lists.jboss.org> wrote:
> Send cdi-dev mailing list submissions to
> cdi-dev(a)lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.jboss.org/mailman/listinfo/cdi-dev
> or, via email, send a message with subject or body 'help' to
> cdi-dev-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> cdi-dev-owner(a)lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of cdi-dev digest..."
>
>
> Today's Topics:
>
> 1. Re: microbenchmark for CDI performance (Mohan Radhakrishnan)
> 2. [VOTE] Using @Priority to order events instead of adding a
> parameter in @Observes (Antoine Sabot-Durand)
> 3. No meeting tomorrow (Antoine Sabot-Durand)
> 4. Updated Invitation: CDI weekly meeting @ Weekly from 18:00 to
> 19:00 on Wednesday except Wed 1 Oct 18:00, Wed 15 Oct 18:00 or
> Wed 29 Oct 18:00 (ASD Perso) (antoine(a)sabot-durand.net)
>
>
> ----------------------------------------------------------------------
>
> Message: 2
> Date: Tue, 28 Oct 2014 09:56:14 +0100
> From: Antoine Sabot-Durand <antoine(a)sabot-durand.net>
> Subject: [cdi-dev] [VOTE] Using @Priority to order events instead of
> adding a parameter in @Observes
> To: cdi-dev <cdi-dev(a)lists.jboss.org>
> Message-ID: <ECAAD9B3-649C-4856-BB24-82AB9EF41763(a)sabot-durand.net>
> Content-Type: text/plain; charset=utf-8
>
> To add events ordering feature we have two choices:
>
> 1) Use @Priority from common annotation specification (JSR-250) (vote +1)
> pros:
> - more consistent with other ordering mechanism we already have in CDI
> (Interceptors, decorators, Alternatives)
> - more Java EE consistent
>
> cons:
> - time consumed in JSR 250 MR participation (@Priority must be update to
> support parameter for target)
> - as @Priority is not part of Java SE, CDI light on java SE will have to
> add the jsr250 jar as dependency only to have this annotation (which will
> make it a little less light)
>
> 2) Add a parameter to @Observes annotation to give order to an observer
> (vote -1)
> pros:
> - works out of the box (we can add this property without ask for other
> specs modification)
> - avoid two annotations to declare an ordered observer (simpler usage)
>
> cons:
> - less Java EE spirit
> - could be seen as an inconsistency with the way we order Interceptors,
> Decorators and Alternatives.
>
> ????????????????????
>
> Who can vote? Everybody registered to this ML can vote. All votes will be
> binding
> How to vote? Answer this mail and vote +1 (for @Priority) 0 or -1(for
> parameter in @Observes)
> Vote will be closed in 72 hours
>
10 years, 1 month