[weld-dev] Question Regarding to Event Qualifier @Any
Gavin King
gavin.king at gmail.com
Sat Jan 16 21:52:31 EST 2010
I agree. @Any is not special in any way when it comes to events. It is
only special for injection.
On Sat, Jan 16, 2010 at 4:05 PM, Gurkan Erdogdu <gurkanerdogdu at yahoo.com> wrote:
> Hi;
>
> I want to ask about using @Any in event qualifiers. In TCK ObserverTest #
> testObserverNotifiedWhenEventTypeAndAllBindingsMatch;
>
> Annotation roleBinding = new RoleBinding("Admin");
>
> // Fire an event that will be delivered to the two above observers
> AnEventType anEvent = new AnEventType();
> getCurrentManager().fireEvent(anEvent, roleBinding);
>
> With observers;
>
> 1* public void observer(@Observes @Any AnEventType event)
> 2* public void observer(@Observes @Role("Admin") AnEventType event)
>
> And TCK says that both of them are called by the container. I really
> confused the usage of @Any. AFAIK, @Any is any qualifier like others in
> Event context. Therefore 1* observer must not be called by the container
> because fired event does not contain @Any qualifier.
>
> WDYT?
>
> --Gurkan
>
> ________________________________
> Yahoo! Türkiye açıldı!
> Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
> www.yahoo.com.tr
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
>
--
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
More information about the weld-dev
mailing list