You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2017/12/04 16:08:21 UTC

org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl#read(javax.enterprise.inject.spi.ObserverMethod) and notifyWith?

Hi guys,

shouldnt org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl#read(javax.enterprise.inject.spi.ObserverMethod)
automatically fill notifyWith? ATM it is not self sufficient.

Romain Manni-Bucau
@rmannibucau |  Blog | Old Blog | Github | LinkedIn

Re: org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl#read(javax.enterprise.inject.spi.ObserverMethod) and notifyWith?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Agree it is not covered but was weird to not inherit from "void
notify(EventContext<T> eventContext)" if notifyWith was not already
called. Maybe something to clarify - no strong opinions for one or the
other while it is clear?

Romain Manni-Bucau
@rmannibucau |  Blog | Old Blog | Github | LinkedIn


2017-12-06 9:13 GMT+01:00 Mark Struberg <st...@yahoo.de.invalid>:
> No, read should just take over the meta-info from the other Observer.
> Since the EventConsumer cannot be extracted from the ObserverMethod interface (afair) we also cannot copy it.
>
> I guess this boils down to non-portable behaviour. At least there is no TCK test which requires to copy it.
>
> LieGrue,
> strub
>
>> Am 06.12.2017 um 06:58 schrieb Romain Manni-Bucau <rm...@gmail.com>:
>>
>> Hmm, looked matching but thought "read" as copy - including the observer.
>>
>> What i do is to observe all observers of a type, veto them all, then select
>> the one i want and reinject it as an observer. Can be a bit limit as case,
>> not sure.
>>
>> Le 5 déc. 2017 23:31, "Mark Struberg" <st...@yahoo.de.invalid> a écrit :
>>
>>> usually not, isn't?
>>>
>>> LieGrue,
>>> strub
>>>
>>>
>>>> Am 05.12.2017 um 22:26 schrieb Romain Manni-Bucau <rmannibucau@gmail.com
>>>> :
>>>>
>>>> Isnt notify adapted?
>>>>
>>>> Le 5 déc. 2017 21:23, "Mark Struberg" <st...@yahoo.de.invalid> a
>>> écrit :
>>>>
>>>>> I think it's fine.
>>>>>
>>>>> With which callback would you fill it?
>>>>> The Observer might not be a configured Observer. It is actually rather
>>> an
>>>>> exceptional case I'd say.
>>>>>
>>>>> LieGrue,
>>>>> strub
>>>>>
>>>>>> Am 04.12.2017 um 17:08 schrieb Romain Manni-Bucau <
>>> rmannibucau@gmail.com
>>>>>> :
>>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> shouldnt org.apache.webbeans.configurator.
>>> ObserverMethodConfiguratorImpl
>>>>> #read(javax..enterprise.inject.spi.ObserverMethod)
>>>>>> automatically fill notifyWith? ATM it is not self sufficient.
>>>>>>
>>>>>> Romain Manni-Bucau
>>>>>> @rmannibucau |  Blog | Old Blog | Github | LinkedIn
>>>>>
>>>>>
>>>
>>>
>

Re: org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl#read(javax.enterprise.inject.spi.ObserverMethod) and notifyWith?

Posted by Mark Struberg <st...@yahoo.de.INVALID>.
No, read should just take over the meta-info from the other Observer. 
Since the EventConsumer cannot be extracted from the ObserverMethod interface (afair) we also cannot copy it.

I guess this boils down to non-portable behaviour. At least there is no TCK test which requires to copy it.

LieGrue,
strub

> Am 06.12.2017 um 06:58 schrieb Romain Manni-Bucau <rm...@gmail.com>:
> 
> Hmm, looked matching but thought "read" as copy - including the observer.
> 
> What i do is to observe all observers of a type, veto them all, then select
> the one i want and reinject it as an observer. Can be a bit limit as case,
> not sure.
> 
> Le 5 déc. 2017 23:31, "Mark Struberg" <st...@yahoo.de.invalid> a écrit :
> 
>> usually not, isn't?
>> 
>> LieGrue,
>> strub
>> 
>> 
>>> Am 05.12.2017 um 22:26 schrieb Romain Manni-Bucau <rmannibucau@gmail.com
>>> :
>>> 
>>> Isnt notify adapted?
>>> 
>>> Le 5 déc. 2017 21:23, "Mark Struberg" <st...@yahoo.de.invalid> a
>> écrit :
>>> 
>>>> I think it's fine.
>>>> 
>>>> With which callback would you fill it?
>>>> The Observer might not be a configured Observer. It is actually rather
>> an
>>>> exceptional case I'd say.
>>>> 
>>>> LieGrue,
>>>> strub
>>>> 
>>>>> Am 04.12.2017 um 17:08 schrieb Romain Manni-Bucau <
>> rmannibucau@gmail.com
>>>>> :
>>>>> 
>>>>> Hi guys,
>>>>> 
>>>>> shouldnt org.apache.webbeans.configurator.
>> ObserverMethodConfiguratorImpl
>>>> #read(javax..enterprise.inject.spi.ObserverMethod)
>>>>> automatically fill notifyWith? ATM it is not self sufficient.
>>>>> 
>>>>> Romain Manni-Bucau
>>>>> @rmannibucau |  Blog | Old Blog | Github | LinkedIn
>>>> 
>>>> 
>> 
>> 


Re: org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl#read(javax.enterprise.inject.spi.ObserverMethod) and notifyWith?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hmm, looked matching but thought "read" as copy - including the observer.

What i do is to observe all observers of a type, veto them all, then select
the one i want and reinject it as an observer. Can be a bit limit as case,
not sure.

Le 5 déc. 2017 23:31, "Mark Struberg" <st...@yahoo.de.invalid> a écrit :

> usually not, isn't?
>
> LieGrue,
> strub
>
>
> > Am 05.12.2017 um 22:26 schrieb Romain Manni-Bucau <rmannibucau@gmail.com
> >:
> >
> > Isnt notify adapted?
> >
> > Le 5 déc. 2017 21:23, "Mark Struberg" <st...@yahoo.de.invalid> a
> écrit :
> >
> >> I think it's fine.
> >>
> >> With which callback would you fill it?
> >> The Observer might not be a configured Observer. It is actually rather
> an
> >> exceptional case I'd say.
> >>
> >> LieGrue,
> >> strub
> >>
> >>> Am 04.12.2017 um 17:08 schrieb Romain Manni-Bucau <
> rmannibucau@gmail.com
> >>> :
> >>>
> >>> Hi guys,
> >>>
> >>> shouldnt org.apache.webbeans.configurator.
> ObserverMethodConfiguratorImpl
> >> #read(javax..enterprise.inject.spi.ObserverMethod)
> >>> automatically fill notifyWith? ATM it is not self sufficient.
> >>>
> >>> Romain Manni-Bucau
> >>> @rmannibucau |  Blog | Old Blog | Github | LinkedIn
> >>
> >>
>
>

Re: org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl#read(javax.enterprise.inject.spi.ObserverMethod) and notifyWith?

Posted by Mark Struberg <st...@yahoo.de.INVALID>.
usually not, isn't?

LieGrue,
strub


> Am 05.12.2017 um 22:26 schrieb Romain Manni-Bucau <rm...@gmail.com>:
> 
> Isnt notify adapted?
> 
> Le 5 déc. 2017 21:23, "Mark Struberg" <st...@yahoo.de.invalid> a écrit :
> 
>> I think it's fine.
>> 
>> With which callback would you fill it?
>> The Observer might not be a configured Observer. It is actually rather an
>> exceptional case I'd say.
>> 
>> LieGrue,
>> strub
>> 
>>> Am 04.12.2017 um 17:08 schrieb Romain Manni-Bucau <rmannibucau@gmail.com
>>> :
>>> 
>>> Hi guys,
>>> 
>>> shouldnt org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl
>> #read(javax..enterprise.inject.spi.ObserverMethod)
>>> automatically fill notifyWith? ATM it is not self sufficient.
>>> 
>>> Romain Manni-Bucau
>>> @rmannibucau |  Blog | Old Blog | Github | LinkedIn
>> 
>> 


Re: org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl#read(javax.enterprise.inject.spi.ObserverMethod) and notifyWith?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Isnt notify adapted?

Le 5 déc. 2017 21:23, "Mark Struberg" <st...@yahoo.de.invalid> a écrit :

> I think it's fine.
>
> With which callback would you fill it?
> The Observer might not be a configured Observer. It is actually rather an
> exceptional case I'd say.
>
> LieGrue,
> strub
>
> > Am 04.12.2017 um 17:08 schrieb Romain Manni-Bucau <rmannibucau@gmail.com
> >:
> >
> > Hi guys,
> >
> > shouldnt org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl
> #read(javax..enterprise.inject.spi.ObserverMethod)
> > automatically fill notifyWith? ATM it is not self sufficient.
> >
> > Romain Manni-Bucau
> > @rmannibucau |  Blog | Old Blog | Github | LinkedIn
>
>

Re: org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl#read(javax.enterprise.inject.spi.ObserverMethod) and notifyWith?

Posted by Mark Struberg <st...@yahoo.de.INVALID>.
I think it's fine.

With which callback would you fill it?
The Observer might not be a configured Observer. It is actually rather an exceptional case I'd say.

LieGrue,
strub

> Am 04.12.2017 um 17:08 schrieb Romain Manni-Bucau <rm...@gmail.com>:
> 
> Hi guys,
> 
> shouldnt org.apache.webbeans.configurator.ObserverMethodConfiguratorImpl#read(javax..enterprise.inject.spi.ObserverMethod)
> automatically fill notifyWith? ATM it is not self sufficient.
> 
> Romain Manni-Bucau
> @rmannibucau |  Blog | Old Blog | Github | LinkedIn