<div dir="ltr"><div>Christian,</div><div><br></div><div>Here's a case that matches your @MyQualifier question in Agorava:</div><a href="https://github.com/agorava/agorava-socializer/blob/develop/src/main/java/org/agorava/socializer/LinkedInController.java">https://github.com/agorava/agorava-socializer/blob/develop/src/main/java/org/agorava/socializer/LinkedInController.java</a><div>uses:<br><div><table class="" style="border-collapse:collapse;border-spacing:0px;color:rgb(51,51,51);font-family:Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,'Segoe UI Emoji','Segoe UI Symbol';font-size:13px;line-height:18.2000007629395px"><tbody><tr><td id="LC48" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal"> </td></tr><tr><td id="L49" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC49" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal"><span class="" style="color:rgb(167,29,93)"><span style="line-height:18.2000007629395px">@Inject</span>
@LinkedIn</span></td></tr><tr><td id="L50" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(238,238,238);border-width:0px 1px 0px 0px"></td><td id="LC50" class="" style="padding:0px 10px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;vertical-align:top;white-space:pre;overflow:visible;word-wrap:normal"><span class="" style="color:rgb(167,29,93)">private</span> <span class="">NetworkUpdateService</span> updateService;</td></tr></tbody></table></div><div><br></div><div>This is the @LinkedIn "MyQualifier"</div><div><a href="https://github.com/agorava/agorava-linkedin/blob/develop/agorava-linkedin-api/src/main/java/org/agorava/linkedin/LinkedIn.java">https://github.com/agorava/agorava-linkedin/blob/develop/agorava-linkedin-api/src/main/java/org/agorava/linkedin/LinkedIn.java</a><br><div><br></div><div>It uses a Meta-annotation @ProviderRelated </div><div><a href="https://github.com/agorava/agorava-core/blob/develop/agorava-core-api/src/main/java/org/agorava/api/atinject/ProviderRelated.java">https://github.com/agorava/agorava-core/blob/develop/agorava-core-api/src/main/java/org/agorava/api/atinject/ProviderRelated.java</a><br><div class="gmail_extra">to declare the service provider (like "LinkedIn" or others) but no @Inherited.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">@Antoine, good luck with the tutorial at DevoXX France and CU soon,</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="margin:0px;font-size:13px;border-collapse:collapse"><span lang="EN-US" style="font-family:Calibri">Werner </span></p></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Apr 14, 2015 at 8:55 AM, <span dir="ltr"><<a href="mailto:cdi-dev-request@lists.jboss.org" target="_blank">cdi-dev-request@lists.jboss.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Send cdi-dev mailing list submissions to<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:cdi-dev-request@lists.jboss.org">cdi-dev-request@lists.jboss.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:cdi-dev-owner@lists.jboss.org">cdi-dev-owner@lists.jboss.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of cdi-dev digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. No meeting today (Antoine Sabot-Durand)<br>
2. [JBoss JIRA] (CDI-519) Instance.destroy() cannot be used for<br>
dependent bean instances not created by the same Instance object<br>
(Martin Kouba (JIRA))<br>
3. Specializing producer methods & qualifiers (Christian Kaltepoth)<br>
4. Re: Specializing producer methods & qualifiers (Jozef Hartinger)<br>
5. Re: Specializing producer methods & qualifiers<br>
(Christian Kaltepoth)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 7 Apr 2015 14:53:22 +0200<br>
From: Antoine Sabot-Durand <<a href="mailto:antoine@sabot-durand.net">antoine@sabot-durand.net</a>><br>
Subject: [cdi-dev] No meeting today<br>
To: cdi-dev <<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a>><br>
Message-ID: <<a href="mailto:DAB22B90-65CE-4B50-84EC-3A718DA040FC@sabot-durand.net">DAB22B90-65CE-4B50-84EC-3A718DA040FC@sabot-durand.net</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi all,<br>
<br>
<br>
I?ll be on Devoxx France rehearsal today (giving a 3 hrs university tomorrow) and won?t be available for the meeting.<br>
<br>
See you next week<br>
<br>
Antoine<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: signature.asc<br>
Type: application/pgp-signature<br>
Size: 495 bytes<br>
Desc: Message signed with OpenPGP using GPGMail<br>
Url : <a href="http://lists.jboss.org/pipermail/cdi-dev/attachments/20150407/95cc5f91/attachment-0001.bin" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/attachments/20150407/95cc5f91/attachment-0001.bin</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 9 Apr 2015 05:18:18 -0400 (EDT)<br>
From: "Martin Kouba (JIRA)" <<a href="mailto:issues@jboss.org">issues@jboss.org</a>><br>
Subject: [cdi-dev] [JBoss JIRA] (CDI-519) Instance.destroy() cannot be<br>
used for dependent bean instances not created by the same Instance<br>
object<br>
To: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
Message-ID:<br>
<JIRA.12567996.1428571044000.66471.1428571098459@Atlassian.JIRA><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
Martin Kouba created CDI-519:<br>
--------------------------------<br>
<br>
Summary: Instance.destroy() cannot be used for dependent bean instances not created by the same Instance object<br>
Key: CDI-519<br>
URL: <a href="https://issues.jboss.org/browse/CDI-519" target="_blank">https://issues.jboss.org/browse/CDI-519</a><br>
Project: CDI Specification Issues<br>
Issue Type: Clarification<br>
Affects Versions: 1.2.Final<br>
Reporter: Martin Kouba<br>
<br>
<br>
5.6.1. The Instance interface:<br>
{quote}<br>
The method destroy() instructs the container to destroy the instance. The bean instance passed to destroy() should be *a dependent scoped bean instance*, or...<br>
{quote}<br>
<br>
I think this should be more obvious. E.g. this wouldn't work correctly even though it doesn't violate the spec:<br>
{code:java}<br>
@Dependent<br>
class Bar {<br>
}<br>
class Foo {<br>
@Inject<br>
Instance<Bar> instance;<br>
void ping() {<br>
instance.destroy(CDI.current().select(Bar.class).get());<br>
}<br>
}<br>
{code}<br>
<br>
<br>
<br>
--<br>
This message was sent by Atlassian JIRA<br>
(v6.3.11#6341)<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 14 Apr 2015 06:13:01 +0200<br>
From: Christian Kaltepoth <<a href="mailto:christian@kaltepoth.de">christian@kaltepoth.de</a>><br>
Subject: [cdi-dev] Specializing producer methods & qualifiers<br>
To: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
Message-ID:<br>
<<a href="mailto:CAEXeC6yYV-NmJ35M0v8d8icjtM57Zw20EuF92Bq2jVc80EPpzQ@mail.gmail.com">CAEXeC6yYV-NmJ35M0v8d8icjtM57Zw20EuF92Bq2jVc80EPpzQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hey all,<br>
<br>
I've a question regarding specializing qualified producer methods. It would<br>
be great to get your opinion on this.<br>
<br>
Imaging this producer method:<br>
<br>
public class MyProducer {<br>
@Produces<br>
@MyQualifier<br>
public Something produce() {<br>
// ...<br>
}<br>
}<br>
<br>
Now imagine the producer method is specialized like this:<br>
<br>
public class MyExtendedProducer extends MyProducer {<br>
@Override<br>
@Produces<br>
@Specializes<br>
public Something produce() {<br>
// ...<br>
}<br>
}<br>
<br>
Please not that I NOT added @MyQualifier to the specializing producer<br>
method.<br>
<br>
Now for this injection point:<br>
<br>
@Inject<br>
@MyQualifier<br>
private Something something;<br>
<br>
What is expected to happen according to the spec? Will the specialized<br>
producer be used or not?<br>
<br>
Thanks<br>
<br>
Christian<br>
<br>
<br>
--<br>
Christian Kaltepoth<br>
Blog: <a href="http://blog.kaltepoth.de/" target="_blank">http://blog.kaltepoth.de/</a><br>
Twitter: <a href="http://twitter.com/chkal" target="_blank">http://twitter.com/chkal</a><br>
GitHub: <a href="https://github.com/chkal" target="_blank">https://github.com/chkal</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/cdi-dev/attachments/20150414/023eaca3/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/attachments/20150414/023eaca3/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Tue, 14 Apr 2015 08:26:11 +0200<br>
From: Jozef Hartinger <<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>><br>
Subject: Re: [cdi-dev] Specializing producer methods & qualifiers<br>
To: Christian Kaltepoth <<a href="mailto:christian@kaltepoth.de">christian@kaltepoth.de</a>>,<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
Message-ID: <<a href="mailto:552CB303.1080904@redhat.com">552CB303.1080904@redhat.com</a>><br>
Content-Type: text/plain; charset="windows-1252"<br>
<br>
Hi Christian,<br>
<br>
yes, the specializing producer inherits all the qualifiers of the<br>
specialized producer. Furthermore, if the specialized producer had<br>
defined a name, this would have been inherited as well (even without<br>
explicit declaration on MyExtendedProducer.produce()). See<br>
<a href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#direct_and_indirect_specialization" target="_blank">http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#direct_and_indirect_specialization</a><br>
for details.<br>
<br>
Jozef<br>
<br>
On 04/14/2015 06:13 AM, Christian Kaltepoth wrote:<br>
> Hey all,<br>
><br>
> I've a question regarding specializing qualified producer methods. It<br>
> would be great to get your opinion on this.<br>
><br>
> Imaging this producer method:<br>
><br>
> public class MyProducer {<br>
> @Produces<br>
> @MyQualifier<br>
> public Something produce() {<br>
> // ...<br>
> }<br>
> }<br>
><br>
> Now imagine the producer method is specialized like this:<br>
><br>
> public class MyExtendedProducer extends MyProducer {<br>
> @Override<br>
> @Produces<br>
> @Specializes<br>
> public Something produce() {<br>
> // ...<br>
> }<br>
> }<br>
><br>
> Please not that I NOT added @MyQualifier to the specializing producer<br>
> method.<br>
><br>
> Now for this injection point:<br>
><br>
> @Inject<br>
> @MyQualifier<br>
> private Something something;<br>
><br>
> What is expected to happen according to the spec? Will the specialized<br>
> producer be used or not?<br>
><br>
> Thanks<br>
><br>
> Christian<br>
><br>
><br>
> --<br>
> Christian Kaltepoth<br>
> Blog: <a href="http://blog.kaltepoth.de/" target="_blank">http://blog.kaltepoth.de/</a><br>
> Twitter: <a href="http://twitter.com/chkal" target="_blank">http://twitter.com/chkal</a><br>
> GitHub: <a href="https://github.com/chkal" target="_blank">https://github.com/chkal</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> cdi-dev mailing list<br>
> <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
><br>
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/cdi-dev/attachments/20150414/25b037a6/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/attachments/20150414/25b037a6/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Tue, 14 Apr 2015 08:55:39 +0200<br>
From: Christian Kaltepoth <<a href="mailto:christian@kaltepoth.de">christian@kaltepoth.de</a>><br>
Subject: Re: [cdi-dev] Specializing producer methods & qualifiers<br>
To: Jozef Hartinger <<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>><br>
Cc: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
Message-ID:<br>
<CAEXeC6yno=tr=<a href="mailto:rm2rfg5HDap8Aw7anV9jfatSioEhbckpabuGA@mail.gmail.com">rm2rfg5HDap8Aw7anV9jfatSioEhbckpabuGA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi Jozef,<br>
<br>
thanks a lot for your response. So if I read this correctly, the qualifier<br>
doesn't need to be annotated with @Inherited for this behavior. Is that<br>
correct?<br>
<br>
Christian<br>
<br>
<br>
2015-04-14 8:26 GMT+02:00 Jozef Hartinger <<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>>:<br>
<br>
> Hi Christian,<br>
><br>
> yes, the specializing producer inherits all the qualifiers of the<br>
> specialized producer. Furthermore, if the specialized producer had defined<br>
> a name, this would have been inherited as well (even without explicit<br>
> declaration on MyExtendedProducer.produce()). See<br>
> <a href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#direct_and_indirect_specialization" target="_blank">http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#direct_and_indirect_specialization</a><br>
> for details.<br>
><br>
> Jozef<br>
><br>
><br>
> On 04/14/2015 06:13 AM, Christian Kaltepoth wrote:<br>
><br>
> Hey all,<br>
><br>
> I've a question regarding specializing qualified producer methods. It<br>
> would be great to get your opinion on this.<br>
><br>
> Imaging this producer method:<br>
><br>
> public class MyProducer {<br>
> @Produces<br>
> @MyQualifier<br>
> public Something produce() {<br>
> // ...<br>
> }<br>
> }<br>
><br>
> Now imagine the producer method is specialized like this:<br>
><br>
> public class MyExtendedProducer extends MyProducer {<br>
> @Override<br>
> @Produces<br>
> @Specializes<br>
> public Something produce() {<br>
> // ...<br>
> }<br>
> }<br>
><br>
> Please not that I NOT added @MyQualifier to the specializing producer<br>
> method.<br>
><br>
> Now for this injection point:<br>
><br>
> @Inject<br>
> @MyQualifier<br>
> private Something something;<br>
><br>
> What is expected to happen according to the spec? Will the specialized<br>
> producer be used or not?<br>
><br>
> Thanks<br>
><br>
> Christian<br>
><br>
><br>
> --<br>
> Christian Kaltepoth<br>
> Blog: <a href="http://blog.kaltepoth.de/" target="_blank">http://blog.kaltepoth.de/</a><br>
> Twitter: <a href="http://twitter.com/chkal" target="_blank">http://twitter.com/chkal</a><br>
> GitHub: <a href="https://github.com/chkal" target="_blank">https://github.com/chkal</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> cdi-dev mailing listcdi-dev@lists.jboss.orghttps://<a href="http://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
><br>
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
><br>
><br>
><br>
<br>
<br>
--<br>
Christian Kaltepoth<br>
Blog: <a href="http://blog.kaltepoth.de/" target="_blank">http://blog.kaltepoth.de/</a><br>
Twitter: <a href="http://twitter.com/chkal" target="_blank">http://twitter.com/chkal</a><br>
GitHub: <a href="https://github.com/chkal" target="_blank">https://github.com/chkal</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/cdi-dev/attachments/20150414/289a422b/attachment.html" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/attachments/20150414/289a422b/attachment.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
<br>
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
<br>
End of cdi-dev Digest, Vol 53, Issue 11<br>
***************************************<br>
</blockquote></div><br></div></div></div></div></div>