[cdi-dev] Some more thoughts on async events
struberg at yahoo.de
Tue Mar 24 18:16:47 EDT 2015
> Am 24.03.2015 um 20:59 schrieb José Paumard <jose.paumard at gmail.com>:
> Having to add this opt-in element on all our legacy observers will be very tedious, so we need to come with a better pattern here.
I don’t get you. The opt-in is EXACTLY what is needed for legacy observers. Or do you like to change the behaviour of all the 10000 observers out there in HUGE projects? This is way too critical to change it implicitly.
I sadly still have seen way too much projects with barely a test coverage. And those projects will likely blow up if we switch all Observers to async by default…
Also note that often you cannot even re-compile libs which use observers. So you just cannot just add anything.
> We could add some information in the beans.xml, that would affect all the observers of the bean archive.
NO WAY! This BDA stuff is already considered a.) legacy and there was a good reason why @Priority for Alternatives, Interceptors and Decorators got introduced to get rid of it - and b.) badly specced (section 5 and 12 have a different definition of BDA).
What we really need btw need some new method on the ProcessObserverMethod to switch async on/off.
More information about the cdi-dev