You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "John D. Ament" <jo...@apache.org> on 2017/07/19 02:48:29 UTC

ProcessBean being called regardless of type

Hi,

I have a portable extension that registers an observer method like so:

public void findSpecialBeans(@Observes ProcessBean<SpecialBean> processBean)

In Weld, this gets invoked once in my test application, only for beans of
type SpecialBean.  In OWB 2, this is getting invoked once for that same
bean, but then again for each additional bean registered in my
corresponding AfterBeanDiscovery (which none of these beans match
SpecialBean). The weird part is that I don't see this behavior in OWB 1.7,
and I don't see it happening within other extensions (e.g. another
ExtensionB also have AfterBeanDiscovery, those beans don't invoke this
extension).

You can see Travis complaining about this issue at
https://travis-ci.org/hammock-project/hammock/jobs/254409046

John

Re: ProcessBean being called regardless of type

Posted by "John D. Ament" <jo...@apache.org>.
Yes sorry, pointed to the wrong error.  This looks much better now, thanks!

On Wed, Jul 19, 2017 at 3:41 AM Romain Manni-Bucau <rm...@gmail.com>
wrote:

> PS: created https://issues.apache.org/jira/browse/OWB-1203
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2017-07-19 9:24 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>
> > oops, was just another failing test in hammock.
> >
> > The one you originally mentionned - datasource one right? - looks
> accurate. Will
> > check it but just looks like we don't unwrap properly container events.
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://blog-rmannibucau.rhcloud.com> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github
> > <https://github.com/rmannibucau> | LinkedIn
> > <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> > <https://javaeefactory-rmannibucau.rhcloud.com>
> >
> > 2017-07-19 9:15 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
> >
> >> Hi John
> >>
> >> just looks like your DefaultListener misses @Dependent in annotated mode
> >> to me.
> >>
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> >> <http://rmannibucau.wordpress.com> | Github
> >> <https://github.com/rmannibucau> | LinkedIn
> >> <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> >> <https://javaeefactory-rmannibucau.rhcloud.com>
> >>
> >> 2017-07-19 4:48 GMT+02:00 John D. Ament <jo...@apache.org>:
> >>
> >>> Hi,
> >>>
> >>> I have a portable extension that registers an observer method like so:
> >>>
> >>> public void findSpecialBeans(@Observes ProcessBean<SpecialBean>
> >>> processBean)
> >>>
> >>> In Weld, this gets invoked once in my test application, only for beans
> of
> >>> type SpecialBean.  In OWB 2, this is getting invoked once for that same
> >>> bean, but then again for each additional bean registered in my
> >>> corresponding AfterBeanDiscovery (which none of these beans match
> >>> SpecialBean). The weird part is that I don't see this behavior in OWB
> >>> 1.7,
> >>> and I don't see it happening within other extensions (e.g. another
> >>> ExtensionB also have AfterBeanDiscovery, those beans don't invoke this
> >>> extension).
> >>>
> >>> You can see Travis complaining about this issue at
> >>> https://travis-ci.org/hammock-project/hammock/jobs/254409046
> >>>
> >>> John
> >>>
> >>
> >>
> >
>

Re: ProcessBean being called regardless of type

Posted by Romain Manni-Bucau <rm...@gmail.com>.
PS: created https://issues.apache.org/jira/browse/OWB-1203


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-07-19 9:24 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:

> oops, was just another failing test in hammock.
>
> The one you originally mentionned - datasource one right? - looks accurate. Will
> check it but just looks like we don't unwrap properly container events.
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2017-07-19 9:15 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> Hi John
>>
>> just looks like your DefaultListener misses @Dependent in annotated mode
>> to me.
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> <https://blog-rmannibucau.rhcloud.com> | Old Blog
>> <http://rmannibucau.wordpress.com> | Github
>> <https://github.com/rmannibucau> | LinkedIn
>> <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
>> <https://javaeefactory-rmannibucau.rhcloud.com>
>>
>> 2017-07-19 4:48 GMT+02:00 John D. Ament <jo...@apache.org>:
>>
>>> Hi,
>>>
>>> I have a portable extension that registers an observer method like so:
>>>
>>> public void findSpecialBeans(@Observes ProcessBean<SpecialBean>
>>> processBean)
>>>
>>> In Weld, this gets invoked once in my test application, only for beans of
>>> type SpecialBean.  In OWB 2, this is getting invoked once for that same
>>> bean, but then again for each additional bean registered in my
>>> corresponding AfterBeanDiscovery (which none of these beans match
>>> SpecialBean). The weird part is that I don't see this behavior in OWB
>>> 1.7,
>>> and I don't see it happening within other extensions (e.g. another
>>> ExtensionB also have AfterBeanDiscovery, those beans don't invoke this
>>> extension).
>>>
>>> You can see Travis complaining about this issue at
>>> https://travis-ci.org/hammock-project/hammock/jobs/254409046
>>>
>>> John
>>>
>>
>>
>

Re: ProcessBean being called regardless of type

Posted by Romain Manni-Bucau <rm...@gmail.com>.
oops, was just another failing test in hammock.

The one you originally mentionned - datasource one right? - looks
accurate. Will
check it but just looks like we don't unwrap properly container events.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-07-19 9:15 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:

> Hi John
>
> just looks like your DefaultListener misses @Dependent in annotated mode
> to me.
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2017-07-19 4:48 GMT+02:00 John D. Ament <jo...@apache.org>:
>
>> Hi,
>>
>> I have a portable extension that registers an observer method like so:
>>
>> public void findSpecialBeans(@Observes ProcessBean<SpecialBean>
>> processBean)
>>
>> In Weld, this gets invoked once in my test application, only for beans of
>> type SpecialBean.  In OWB 2, this is getting invoked once for that same
>> bean, but then again for each additional bean registered in my
>> corresponding AfterBeanDiscovery (which none of these beans match
>> SpecialBean). The weird part is that I don't see this behavior in OWB 1.7,
>> and I don't see it happening within other extensions (e.g. another
>> ExtensionB also have AfterBeanDiscovery, those beans don't invoke this
>> extension).
>>
>> You can see Travis complaining about this issue at
>> https://travis-ci.org/hammock-project/hammock/jobs/254409046
>>
>> John
>>
>
>

Re: ProcessBean being called regardless of type

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi John

just looks like your DefaultListener misses @Dependent in annotated mode to
me.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-07-19 4:48 GMT+02:00 John D. Ament <jo...@apache.org>:

> Hi,
>
> I have a portable extension that registers an observer method like so:
>
> public void findSpecialBeans(@Observes ProcessBean<SpecialBean>
> processBean)
>
> In Weld, this gets invoked once in my test application, only for beans of
> type SpecialBean.  In OWB 2, this is getting invoked once for that same
> bean, but then again for each additional bean registered in my
> corresponding AfterBeanDiscovery (which none of these beans match
> SpecialBean). The weird part is that I don't see this behavior in OWB 1.7,
> and I don't see it happening within other extensions (e.g. another
> ExtensionB also have AfterBeanDiscovery, those beans don't invoke this
> extension).
>
> You can see Travis complaining about this issue at
> https://travis-ci.org/hammock-project/hammock/jobs/254409046
>
> John
>