@Inject @LinkedIn | |
private NetworkUpdateService updateService; |
Werner
Send cdi-dev mailing list submissions to
cdi-dev@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@lists.jboss.org
You can reach the person managing the list at
cdi-dev-owner@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. No meeting today (Antoine Sabot-Durand)
2. [JBoss JIRA] (CDI-519) Instance.destroy() cannot be used for
dependent bean instances not created by the same Instance object
(Martin Kouba (JIRA))
3. Specializing producer methods & qualifiers (Christian Kaltepoth)
4. Re: Specializing producer methods & qualifiers (Jozef Hartinger)
5. Re: Specializing producer methods & qualifiers
(Christian Kaltepoth)
----------------------------------------------------------------------
Message: 1
Date: Tue, 7 Apr 2015 14:53:22 +0200
From: Antoine Sabot-Durand <antoine@sabot-durand.net>
Subject: [cdi-dev] No meeting today
To: cdi-dev <cdi-dev@lists.jboss.org>
Message-ID: <DAB22B90-65CE-4B50-84EC-3A718DA040FC@sabot-durand.net>
Content-Type: text/plain; charset="utf-8"
Hi all,
I?ll be on Devoxx France rehearsal today (giving a 3 hrs university tomorrow) and won?t be available for the meeting.
See you next week
Antoine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.jboss.org/pipermail/cdi-dev/attachments/20150407/95cc5f91/attachment-0001.bin
------------------------------
Message: 2
Date: Thu, 9 Apr 2015 05:18:18 -0400 (EDT)
From: "Martin Kouba (JIRA)" <issues@jboss.org>
Subject: [cdi-dev] [JBoss JIRA] (CDI-519) Instance.destroy() cannot be
used for dependent bean instances not created by the same Instance
object
To: cdi-dev@lists.jboss.org
Message-ID:
<JIRA.12567996.1428571044000.66471.1428571098459@Atlassian.JIRA>
Content-Type: text/plain; charset=UTF-8
Martin Kouba created CDI-519:
--------------------------------
Summary: Instance.destroy() cannot be used for dependent bean instances not created by the same Instance object
Key: CDI-519
URL: https://issues.jboss.org/browse/CDI-519
Project: CDI Specification Issues
Issue Type: Clarification
Affects Versions: 1.2.Final
Reporter: Martin Kouba
5.6.1. The Instance interface:
{quote}
The method destroy() instructs the container to destroy the instance. The bean instance passed to destroy() should be *a dependent scoped bean instance*, or...
{quote}
I think this should be more obvious. E.g. this wouldn't work correctly even though it doesn't violate the spec:
{code:java}
@Dependent
class Bar {
}
class Foo {
@Inject
Instance<Bar> instance;
void ping() {
instance.destroy(CDI.current().select(Bar.class).get());
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
------------------------------
Message: 3
Date: Tue, 14 Apr 2015 06:13:01 +0200
From: Christian Kaltepoth <christian@kaltepoth.de>
Subject: [cdi-dev] Specializing producer methods & qualifiers
To: cdi-dev@lists.jboss.org
Message-ID:
<CAEXeC6yYV-NmJ35M0v8d8icjtM57Zw20EuF92Bq2jVc80EPpzQ@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hey all,
I've a question regarding specializing qualified producer methods. It would
be great to get your opinion on this.
Imaging this producer method:
public class MyProducer {
@Produces
@MyQualifier
public Something produce() {
// ...
}
}
Now imagine the producer method is specialized like this:
public class MyExtendedProducer extends MyProducer {
@Override
@Produces
@Specializes
public Something produce() {
// ...
}
}
Please not that I NOT added @MyQualifier to the specializing producer
method.
Now for this injection point:
@Inject
@MyQualifier
private Something something;
What is expected to happen according to the spec? Will the specialized
producer be used or not?
Thanks
Christian
--
Christian Kaltepoth
Blog: http://blog.kaltepoth.de/
Twitter: http://twitter.com/chkal
GitHub: https://github.com/chkal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20150414/023eaca3/attachment-0001.html
------------------------------
Message: 4
Date: Tue, 14 Apr 2015 08:26:11 +0200
From: Jozef Hartinger <jharting@redhat.com>
Subject: Re: [cdi-dev] Specializing producer methods & qualifiers
To: Christian Kaltepoth <christian@kaltepoth.de>,
cdi-dev@lists.jboss.org
Message-ID: <552CB303.1080904@redhat.com>
Content-Type: text/plain; charset="windows-1252"
Hi Christian,
yes, the specializing producer inherits all the qualifiers of the
specialized producer. Furthermore, if the specialized producer had
defined a name, this would have been inherited as well (even without
explicit declaration on MyExtendedProducer.produce()). See
http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#direct_and_indirect_specialization
for details.
Jozef
On 04/14/2015 06:13 AM, Christian Kaltepoth wrote:
> Hey all,
>
> I've a question regarding specializing qualified producer methods. It
> would be great to get your opinion on this.
>
> Imaging this producer method:
>
> public class MyProducer {
> @Produces
> @MyQualifier
> public Something produce() {
> // ...
> }
> }
>
> Now imagine the producer method is specialized like this:
>
> public class MyExtendedProducer extends MyProducer {
> @Override
> @Produces
> @Specializes
> public Something produce() {
> // ...
> }
> }
>
> Please not that I NOT added @MyQualifier to the specializing producer
> method.
>
> Now for this injection point:
>
> @Inject
> @MyQualifier
> private Something something;
>
> What is expected to happen according to the spec? Will the specialized
> producer be used or not?
>
> Thanks
>
> Christian
>
>
> --
> Christian Kaltepoth
> Blog: http://blog.kaltepoth.de/
> Twitter: http://twitter.com/chkal
> GitHub: https://github.com/chkal
>
>
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev@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/20150414/25b037a6/attachment-0001.html
------------------------------
Message: 5
Date: Tue, 14 Apr 2015 08:55:39 +0200
From: Christian Kaltepoth <christian@kaltepoth.de>
Subject: Re: [cdi-dev] Specializing producer methods & qualifiers
To: Jozef Hartinger <jharting@redhat.com>
Cc: cdi-dev@lists.jboss.org
Message-ID:
<CAEXeC6yno=tr=rm2rfg5HDap8Aw7anV9jfatSioEhbckpabuGA@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Jozef,
thanks a lot for your response. So if I read this correctly, the qualifier
doesn't need to be annotated with @Inherited for this behavior. Is that
correct?
Christian
2015-04-14 8:26 GMT+02:00 Jozef Hartinger <jharting@redhat.com>:
> Hi Christian,
>
> yes, the specializing producer inherits all the qualifiers of the
> specialized producer. Furthermore, if the specialized producer had defined
> a name, this would have been inherited as well (even without explicit
> declaration on MyExtendedProducer.produce()). See
> http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#direct_and_indirect_specialization
> for details.
>
> Jozef
>
>
> On 04/14/2015 06:13 AM, Christian Kaltepoth wrote:
>
> Hey all,
>
> I've a question regarding specializing qualified producer methods. It
> would be great to get your opinion on this.
>
> Imaging this producer method:
>
> public class MyProducer {
> @Produces
> @MyQualifier
> public Something produce() {
> // ...
> }
> }
>
> Now imagine the producer method is specialized like this:
>
> public class MyExtendedProducer extends MyProducer {
> @Override
> @Produces
> @Specializes
> public Something produce() {
> // ...
> }
> }
>
> Please not that I NOT added @MyQualifier to the specializing producer
> method.
>
> Now for this injection point:
>
> @Inject
> @MyQualifier
> private Something something;
>
> What is expected to happen according to the spec? Will the specialized
> producer be used or not?
>
> Thanks
>
> Christian
>
>
> --
> Christian Kaltepoth
> Blog: http://blog.kaltepoth.de/
> Twitter: http://twitter.com/chkal
> GitHub: https://github.com/chkal
>
>
>
> _______________________________________________
> cdi-dev mailing listcdi-dev@lists.jboss.orghttps://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.
>
>
>
--
Christian Kaltepoth
Blog: http://blog.kaltepoth.de/
Twitter: http://twitter.com/chkal
GitHub: https://github.com/chkal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20150414/289a422b/attachment.html
------------------------------
_______________________________________________
cdi-dev mailing list
cdi-dev@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 53, Issue 11
***************************************